Fix null pointer deref that caused build failures on Solaris
[fw/sdcc] / src / ds390 / gen.c
index ad5d8c4e5e61692862e1b9e9405406aeae15c40c..d417b07fc9afe1de751f7ed6112b74f7b547de3f 100644 (file)
@@ -12697,7 +12697,7 @@ gen390Code (iCode * lic)
   }
 #if 1
   /* print the allocation information */
-  if (allocInfo)
+  if (allocInfo && currFunc)
     printAllocInfo (currFunc, codeOutFile);
 #endif
   /* if debug information required */