From 64fb6410cf5de167487046820d3889902ded93b9 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 3 Mar 2012 03:19:29 +0000 Subject: [PATCH] - Fixed: FStringTable::operator[] would crash when passed a NULL string pointer. SVN r3401 (trunk) --- src/stringtable.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stringtable.cpp b/src/stringtable.cpp index 5453cead8..f575dca17 100644 --- a/src/stringtable.cpp +++ b/src/stringtable.cpp @@ -324,6 +324,10 @@ size_t FStringTable::ProcessEscapes (char *iptr) // Finds a string by name and returns its value const char *FStringTable::operator[] (const char *name) const { + if (name == NULL) + { + return NULL; + } DWORD bucket = MakeKey (name) & (HASH_SIZE - 1); StringEntry *entry = Buckets[bucket];