summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpixel <pixel>2008-02-13 15:17:37 +0000
committerpixel <pixel>2008-02-13 15:17:37 +0000
commitb71ca0bfa90ec152387a995b6a55cb686aa4c882 (patch)
treea7a652da3829002c85b4f8d6bcf005e56f788d46
parentaeb420d9f20f0973d428b5de0bd19f83c684bf54 (diff)
Be safe if no mpq file is added in the mpq-fs...
-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;