]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/33
authorCristy <urban-warrior@imagemagick.org>
Mon, 21 Sep 2015 22:18:44 +0000 (18:18 -0400)
committerCristy <urban-warrior@imagemagick.org>
Mon, 21 Sep 2015 22:18:44 +0000 (18:18 -0400)
coders/dot.c

index 3f242aa87ebf3d4943cd6c7481d7b65ee1b74983..b03bf28a9e55f9f9277306f4477a83d2d29c2b7e 100644 (file)
@@ -65,7 +65,7 @@
 #undef HAVE_CONFIG_H
 #include <gvc.h>
 static GVC_t
-  *graphic_context;
+  *graphic_context = (GVC_t *) NULL;
 #endif
 \f
 #if defined(MAGICKCORE_GVC_DELEGATE)
@@ -146,6 +146,7 @@ static Image *ReadDOTImage(const ImageInfo *image_info,ExceptionInfo *exception)
       return ((Image *) NULL);
     }
   option=GetImageOption(image_info,"dot:layout-engine");
+  assert(graphic_context != (GVC_t *) NULL);
   if (option == (const char *) NULL)
     gvLayout(graphic_context,graph,(char *) "dot");
   else
@@ -236,5 +237,6 @@ ModuleExport void UnregisterDOTImage(void)
   (void) UnregisterMagickInfo("DOT");
 #if defined(MAGICKCORE_GVC_DELEGATE)
   gvFreeContext(graphic_context);
+  graphic_context=(GVC_t *) NULL;
 #endif
 }