added null pointer checks to path setup functions
authorHolger Schemel <info@artsoft.org>
Mon, 2 Mar 2015 10:21:40 +0000 (11:21 +0100)
committerHolger Schemel <info@artsoft.org>
Mon, 2 Mar 2015 10:21:40 +0000 (11:21 +0100)
src/libgame/setup.c

index 8e2152a25b399a8459fb0da24267b1d209214ea1..69e25fa99c6f8de4cd613f77f3aba83682eb0524 100644 (file)
@@ -315,6 +315,9 @@ static char *getSetupArtworkDir(TreeInfo *ti)
 {
   static char *artwork_dir = NULL;
 
+  if (ti == NULL)
+    return NULL;
+
   checked_free(artwork_dir);
 
   artwork_dir = getPath2(ti->basepath, ti->fullpath);