From: Dirk Lemstra Date: Fri, 16 Mar 2018 18:12:04 +0000 (+0100) Subject: Fixed issue where resource_semaphore was not allocated. X-Git-Tag: 7.0.7-27~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=534e8fc78388955af5fc1594fa884e505a7c60fd;p=imagemagick Fixed issue where resource_semaphore was not allocated. --- diff --git a/MagickCore/resource.c b/MagickCore/resource.c index ed465d413..96c5a72f0 100644 --- a/MagickCore/resource.c +++ b/MagickCore/resource.c @@ -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();