about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/engine/shared/huffman.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/engine/shared/huffman.cpp b/src/engine/shared/huffman.cpp
index dfa8923a..446b6003 100644
--- a/src/engine/shared/huffman.cpp
+++ b/src/engine/shared/huffman.cpp
@@ -228,6 +228,9 @@ int CHuffman::Decompress(const void *pInput, int InputSize, void *pOutput, int O
 		// {C} load symbol now if we didn't that earlier at location {A}
 		if(!pNode)
 			pNode = m_apDecodeLut[Bits&HUFFMAN_LUTMASK];
+		
+		if(!pNode)
+			return -1;
 
 		// {D} check if we hit a symbol already
 		if(pNode->m_NumBits)