Source

gd-libgd / src / gd_png.c

Diff from to

src/gd_png.c

 {
 	void *rv;
 	gdIOCtx *out = gdNewDynamicCtx (2048, NULL);
+	if (out == NULL) return NULL;
 	gdImagePngCtxEx (im, out, -1);
 	rv = gdDPExtractData (out, size);
 	out->gd_free (out);
 {
 	void *rv;
 	gdIOCtx *out = gdNewDynamicCtx (2048, NULL);
+	if (out == NULL) return NULL;
 	gdImagePngCtxEx (im, out, level);
 	rv = gdDPExtractData (out, size);
 	out->gd_free (out);