summaryrefslogtreecommitdiffstats
path: root/src/trace
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-07-25 01:06:47 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-07-25 01:06:47 +0000
commit4f3cc7cbb73a72e1ab10a587a3b81f8c8737fec3 (patch)
tree75853d8eec5e85fb93a2a798b57f072e3c9eeb99 /src/trace
parentReplace direct use of Cairo contexts and surfaces in the rendering tree (diff)
parentRevert workarounds from 10501 - no longer necessary (diff)
downloadinkscape-4f3cc7cbb73a72e1ab10a587a3b81f8c8737fec3.tar.gz
inkscape-4f3cc7cbb73a72e1ab10a587a3b81f8c8737fec3.zip
Merge from trunk
(bzr r10347.1.18)
Diffstat (limited to 'src/trace')
-rw-r--r--src/trace/imagemap.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/trace/imagemap.cpp b/src/trace/imagemap.cpp
index a9ad9b9c8..c5a6bc2b5 100644
--- a/src/trace/imagemap.cpp
+++ b/src/trace/imagemap.cpp
@@ -78,10 +78,16 @@ GrayMap *GrayMapCreate(int width, int height)
me->height = height;
me->pixels = (unsigned long *)
malloc(sizeof(unsigned long) * width * height);
+ if (!me->pixels)
+ {
+ free(me);
+ return NULL;
+ }
me->rows = (unsigned long **)
malloc(sizeof(unsigned long *) * height);
- if (!me->pixels || !me->rows)
+ if (!me->rows)
{
+ free(me->pixels);
free(me);
return NULL;
}