avoid compilation warning on some architectures
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Nov 2011 10:08:11 +0000 (10:08 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Nov 2011 10:08:11 +0000 (10:08 +0000)
HLT/BASE/AliHLTHuffman.cxx

index 98ea042..1a9dc5a 100644 (file)
@@ -327,9 +327,9 @@ Bool_t AliHLTHuffman::GenerateHuffmanTree() {
        }
        while (nodeCollection.size() > 1) {
                // insert new node into structure, combining the two with lowest probability
-               nodeCollection.insert(
-                               new AliHLTHuffmanTreeNode(*nodeCollection.begin(),
-                                               *++nodeCollection.begin()));
+               AliHLTHuffmanNode* node=new AliHLTHuffmanTreeNode(*nodeCollection.begin(), *++nodeCollection.begin());
+               if (!node) return kFALSE;
+               nodeCollection.insert(node);
                nodeCollection.erase(nodeCollection.begin());
                nodeCollection.erase(nodeCollection.begin());
        }