e82e7c83f6
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/netpbm#e8ffa0347758e32b9e9c4c788e808f5cd727ed46
27 lines
788 B
Diff
27 lines
788 B
Diff
diff -urNp old/converter/other/svgtopam.c new/converter/other/svgtopam.c
|
|
--- old/converter/other/svgtopam.c 2017-02-08 12:11:02.593690917 +0100
|
|
+++ new/converter/other/svgtopam.c 2017-02-08 13:49:38.319029371 +0100
|
|
@@ -771,12 +771,17 @@ createCanvas(unsigned int const width,
|
|
|
|
MALLOCVAR_NOFAIL(canvasP);
|
|
|
|
- canvasP->width = width;
|
|
- canvasP->height = height;
|
|
- canvasP->pixels = ppm_allocarray(width, height);
|
|
- canvasP->maxval = maxval;
|
|
+ if(canvasP != NULL){
|
|
+ canvasP->width = width;
|
|
+ canvasP->height = height;
|
|
+ canvasP->pixels = ppm_allocarray(width, height);
|
|
+ canvasP->maxval = maxval;
|
|
+
|
|
+ *canvasPP = canvasP;
|
|
+ } else {
|
|
+ pm_error("can't allocate memory for canvas");
|
|
+ }
|
|
|
|
- *canvasPP = canvasP;
|
|
}
|
|
|
|
|