Permalink
Browse files

msSaveImageGDAL(): avoid segfault in msXmpPresent() if called with ma…

…p == NULL
  • Loading branch information...
1 parent b200a1a commit b18cac6241d276d662f850699465ba50db0c70c8 @rouault rouault committed Jul 16, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 mapgdal.c
View
@@ -162,7 +162,9 @@ int msSaveImageGDAL( mapObj *map, imageObj *image, char *filename )
memset(&rb,0,sizeof(rasterBufferObj));
#ifdef USE_EXEMPI
- bUseXmp = msXmpPresent(map);
+ if( map != NULL ) {
+ bUseXmp = msXmpPresent(map);
+ }
#endif

0 comments on commit b18cac6

Please sign in to comment.