summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mpq-fs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mpq-fs.c b/mpq-fs.c
index 3a2a4b3..84e48a0 100644
--- a/mpq-fs.c
+++ b/mpq-fs.c
@@ -104,6 +104,9 @@ void mpqlib_fs_attach_listfile(struct mpq_archive_t * mpq_a, const char * listfi
* Recursively find a file.
*/
static hash_entry * find_file(char * fname) {
+ if (!hash_table)
+ return NULL;
+
if (!hfind(hash_table, (uint8_t *) fname, strlen(fname)))
return NULL;