From b71ca0bfa90ec152387a995b6a55cb686aa4c882 Mon Sep 17 00:00:00 2001 From: pixel Date: Wed, 13 Feb 2008 15:17:37 +0000 Subject: Be safe if no mpq file is added in the mpq-fs... --- mpq-fs.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mpq-fs.c') 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; -- cgit v1.2.3