Permalink
Browse files

Fix NULL pointer dereference in mapdraw.c (#5069)

  • Loading branch information...
aeichner authored and tbonfort committed Feb 12, 2015
1 parent 65bce48 commit 1fdcb04767b700424dbadd60dac75dda6cf78304
Showing with 3 additions and 2 deletions.
  1. +3 −2 mapdraw.c
View
@@ -103,12 +103,13 @@ imageObj *msPrepareImage(mapObj *map, int allow_nonsquare)
} else {
image = NULL;
}
image->map = map;
if(!image) {
msSetError(MS_IMGERR, "Unable to initialize image.", "msPrepareImage()");
return(NULL);
}
image->map = map;
/*
* If we want to support nonsquare pixels, note that now, otherwise

0 comments on commit 1fdcb04

Please sign in to comment.