Commits

Anonymous committed 1b03e9d

- #127, segfault when createwbmp fails

Comments (0)

Files changed (1)

 
 
   /* create the WBMP */
-  if ((wbmp =
-       createwbmp (gdImageSX (image), gdImageSY (image), WBMP_WHITE)) == NULL)
-    fprintf (stderr, "Could not create WBMP\n");
+  if ((wbmp = createwbmp (gdImageSX (image), gdImageSY (image), WBMP_WHITE)) == NULL)
+  {
+	fprintf (stderr, "Could not create WBMP\n");
+	return;
+  }
 
   /* fill up the WBMP structure */
   pos = 0;