]> granicus.if.org Git - imagemagick/commitdiff
Added extra check
authorDirk Lemstra <dirk@git.imagemagick.org>
Fri, 3 Nov 2017 20:54:51 +0000 (21:54 +0100)
committerDirk Lemstra <dirk@git.imagemagick.org>
Fri, 3 Nov 2017 20:54:51 +0000 (21:54 +0100)
MagickCore/resource.c

index fc8e03ddd498b4fbc6211033c5892439e5020b77..c5a35b4e2c6a36aad3d6b2503b13440f006464e3 100644 (file)
@@ -381,9 +381,12 @@ MagickExport MagickBooleanType AcquireMagickResource(const ResourceType type,
       break;
   }
   UnlockSemaphoreInfo(resource_semaphore);
-  (void) LogMagickEvent(ResourceEvent,GetMagickModule(),"%s: %s/%s/%s",
-    CommandOptionToMnemonic(MagickResourceOptions,(ssize_t) type),
-    resource_request,resource_current,resource_limit);
+  if (logging != MagickFalse)
+    {
+      (void) LogMagickEvent(ResourceEvent,GetMagickModule(),"%s: %s/%s/%s",
+        CommandOptionToMnemonic(MagickResourceOptions,(ssize_t) type),
+        resource_request,resource_current,resource_limit);
+    }
   return(status);
 }
 \f