]> granicus.if.org Git - imagemagick/commitdiff
Fixed issue where resource_semaphore was not allocated.
authorDirk Lemstra <dirk@git.imagemagick.org>
Fri, 16 Mar 2018 18:12:04 +0000 (19:12 +0100)
committerDirk Lemstra <dirk@git.imagemagick.org>
Fri, 16 Mar 2018 18:12:04 +0000 (19:12 +0100)
MagickCore/resource.c

index ed465d413f03311de6f8accd93b7d04616f2f30e..96c5a72f02e70d03a28b7213b66d2dc167b2145c 100644 (file)
@@ -545,6 +545,8 @@ MagickExport int AcquireUniqueFileResource(char *path)
   (void) LogMagickEvent(ResourceEvent,GetMagickModule(),"...");
   if (random_info == (RandomInfo *) NULL)
     {
+      if (resource_semaphore == (SemaphoreInfo *) NULL)
+        ActivateSemaphoreInfo(&resource_semaphore);
       LockSemaphoreInfo(resource_semaphore);
       if (random_info == (RandomInfo *) NULL)
         random_info=AcquireRandomInfo();