]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
pointer protection added
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Sep 2011 06:12:07 +0000 (06:12 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Sep 2011 06:12:07 +0000 (06:12 +0000)
HLT/BASE/AliHLTHuffman.cxx

index 20b18391bf8fc20209da3ab3e39f1bce8964d2e3..cb5e3eefed8176a83efb7b1842d7e76bd9580bec 100644 (file)
@@ -243,6 +243,7 @@ const std::bitset<64>& AliHLTHuffman::Encode(const AliHLTUInt64_t v, AliHLTUInt6
 Bool_t AliHLTHuffman::Decode(std::bitset<64> bits, AliHLTUInt64_t& value) const {
        // TODO: check decoding logic, righ now it is just as written
        AliHLTHuffmanNode* currNode = fHuffTopNode;
+       if (!currNode) return kFALSE;
        if (currNode->GetValue() >= 0) {
                // handle case with just one node - also quite unlikely
                value = currNode->GetValue();