diff --git a/magick/log.c b/magick/log.c
index dad845b..677fe21 100644
--- a/magick/log.c
+++ b/magick/log.c
@@ -530,7 +530,8 @@
 {
   if ((log_list == (LinkedListInfo *) NULL) && (instantiate_log == MagickFalse))
     {
-      AcquireSemaphoreInfo(&log_semaphore);
+      if (log_semaphore == (SemaphoreInfo *) NULL)
+        AcquireSemaphoreInfo(&log_semaphore);
       LockSemaphoreInfo(log_semaphore);
       if ((log_list == (LinkedListInfo *) NULL) &&
           (instantiate_log == MagickFalse))