]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Wed, 19 Mar 2014 13:39:13 +0000 (13:39 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Wed, 19 Mar 2014 13:39:13 +0000 (13:39 +0000)
MagickCore/delegate.c

index 0df9dd579cb8e1907f37e112b0edf9b929062fc0..eda0971d32edfff2360f9a2df3f7921b2d1224c8 100644 (file)
@@ -759,8 +759,8 @@ MagickExport MagickBooleanType GetDelegateThreadSupport(
 %                                                                             %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-%  IsDelegateCacheInstantiated() determines if the delegate list is instantiated.
-%  If not, it instantiates the list and returns it.
+%  IsDelegateCacheInstantiated() determines if the delegate cache is
+%  instantiated.  If not, it instantiates the cache and returns it.
 %
 %  The format of the IsDelegateInstantiated method is:
 %
@@ -1389,6 +1389,8 @@ static MagickBooleanType LoadDelegateCache(LinkedListInfo *delegate_cache,
       continue;
     if (LocaleCompare(keyword,"/>") == 0)
       {
+        if (delegate_info->thread_support == MagickFalse)
+          delegate_info->semaphore=AcquireSemaphoreInfo();
         status=AppendValueToLinkedList(delegate_cache,delegate_info);
         if( IfMagickFalse(status) )
           (void) ThrowMagickException(exception,GetMagickModule(),
@@ -1492,8 +1494,6 @@ static MagickBooleanType LoadDelegateCache(LinkedListInfo *delegate_cache,
         if (LocaleCompare((char *) keyword,"thread-support") == 0)
           {
             delegate_info->thread_support=IsStringTrue(token);
-            if (delegate_info->thread_support != MagickFalse)
-              delegate_info->semaphore=AcquireSemaphoreInfo();
             break;
           }
         break;