From 412a11b4eacfbfce7f9bcda999d7accc652476ba Mon Sep 17 00:00:00 2001 From: Thomas Bonfort Date: Fri, 6 Apr 2012 16:36:46 +0200 Subject: [PATCH] fix segfault in wms error image when no error set shown in #4266, although unrelated to the underlying issue --- maperror.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maperror.c b/maperror.c index bb263eed4b..db18a8f030 100644 --- a/maperror.c +++ b/maperror.c @@ -403,6 +403,9 @@ void msWriteErrorImage(mapObj *map, char *filename, int blank) { colorObj labelcolor, labeloutlinecolor, imagecolor, *imagecolorptr=NULL; ls.color = &labelcolor; ls.outlinecolor = &labeloutlinecolor; + if(!errormsg) { + errormsg = msStrdup("No error found sorry. This is likely a bug"); + } if (map) { if( map->width > 0 && map->height > 0 )