rnd-19991010-1-src
[rocksndiamonds.git] / src / misc.c
index 40bfad4bf83cea07b73f21b6fd9d25e5f0301fb1..b6f8f940acb5817e270ec39e71c88fc69336508c 100644 (file)
@@ -334,7 +334,12 @@ char *getPath3(char *path1, char *path2, char *path3)
 
 char *getStringCopy(char *s)
 {
-  char *s_copy = checked_malloc(strlen(s) + 1);
+  char *s_copy;
+
+  if (s == NULL)
+    return NULL;
+
+  s_copy = checked_malloc(strlen(s) + 1);
 
   strcpy(s_copy, s);
   return s_copy;