From b4dd4d266f2d450a2996abf5294671d888991132 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 23 Mar 2019 16:18:39 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1515 --- coders/pango.c | 7 +++++-- coders/vid.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/coders/pango.c b/coders/pango.c index fd9040bc4..5f9118738 100644 --- a/coders/pango.c +++ b/coders/pango.c @@ -201,8 +201,11 @@ static Image *ReadPANGOImage(const ImageInfo *image_info, else property=InterpretImageProperties((ImageInfo *) image_info,image,option, exception); - (void) SetImageProperty(image,"caption",property,exception); - property=DestroyString(property); + if (property != (char *) NULL) + { + (void) SetImageProperty(image,"caption",property,exception); + property=DestroyString(property); + } caption=ConstantString(GetImageProperty(image,"caption",exception)); /* Get context. diff --git a/coders/vid.c b/coders/vid.c index 5aa4b0941..dd57930a3 100644 --- a/coders/vid.c +++ b/coders/vid.c @@ -176,8 +176,11 @@ static Image *ReadVIDImage(const ImageInfo *image_info,ExceptionInfo *exception) break; label=InterpretImageProperties((ImageInfo *) image_info,next_image, DefaultTileLabel,exception); - (void) SetImageProperty(next_image,"label",label,exception); - label=DestroyString(label); + if (label != (char *) NULL) + { + (void) SetImageProperty(next_image,"label",label,exception); + label=DestroyString(label); + } if (image_info->debug != MagickFalse) (void) LogMagickEvent(CoderEvent,GetMagickModule(), "geometry: %.20gx%.20g",(double) next_image->columns,(double) -- 2.40.0