]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/annotate.c
(no commit message)
[imagemagick] / MagickCore / annotate.c
index d945ccade2a476afde3e6810eee5dee4cab62190..1966cb6bb96dcc3b652da4600975435da92f6e6a 100644 (file)
@@ -145,7 +145,8 @@ static MagickBooleanType
 */
 MagickPrivate MagickBooleanType AnnotateComponentGenesis(void)
 {
-  annotate_semaphore=AcquireSemaphoreInfo();
+  if (annotate_semaphore == (SemaphoreInfo *) NULL)
+    annotate_semaphore=AcquireSemaphoreInfo();
   return(MagickTrue);
 }
 \f
@@ -170,7 +171,7 @@ MagickPrivate MagickBooleanType AnnotateComponentGenesis(void)
 MagickPrivate void AnnotateComponentTerminus(void)
 {
   if (annotate_semaphore == (SemaphoreInfo *) NULL)
-    annotate_semaphore=AcquireSemaphoreInfo();
+    ActivateSemaphoreInfo(&annotate_semaphore);
   RelinquishSemaphoreInfo(&annotate_semaphore);
 }
 \f
@@ -1904,7 +1905,7 @@ static MagickBooleanType RenderX11(Image *image,const DrawInfo *draw_info,
     status;
 
   if (annotate_semaphore == (SemaphoreInfo *) NULL)
-    annotate_semaphore=AcquireSemaphoreInfo();
+    ActivateSemaphoreInfo(&annotate_semaphore);
   LockSemaphoreInfo(annotate_semaphore);
   status=XRenderImage(image,draw_info,offset,metrics,exception);
   UnlockSemaphoreInfo(annotate_semaphore);