aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/misc.c b/misc.c
index f0c4abd..5621597 100644
--- a/misc.c
+++ b/misc.c
@@ -511,6 +511,9 @@ char *make_prefs_path(const char *dir, const char *sep,
char *path, *p;
const char *q;
+ if (!dir || !sep || !game || !suffix)
+ return NULL;
+
path = snewn(dirlen + seplen + gamelen + suffixlen + 1, char);
p = path;