]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Wed, 9 Nov 2011 23:07:28 +0000 (23:07 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Wed, 9 Nov 2011 23:07:28 +0000 (23:07 +0000)
coders/tiff.c

index 87b5d076ff4853390407f61a1f5ca3f797c4fc5d..c79c839763318043b493dbb61fc0fb48b9e0990f 100644 (file)
@@ -1912,9 +1912,15 @@ ModuleExport void UnregisterTIFFImage(void)
     tiff_semaphore=AllocateSemaphoreInfo();
   LockSemaphoreInfo(tiff_semaphore);
   if (instantiate_key != MagickFalse)
-    if (MagickDeleteThreadKey(tiff_exception) == MagickFalse)
-      ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
-  instantiate_key=MagickFalse;
+    {
+#if defined(MAGICKCORE_HAVE_TIFFMERGEFIELDINFO) && defined(MAGICKCORE_HAVE_TIFFSETTAGEXTENDER)
+      if (tag_extender == (TIFFExtendProc) NULL)
+        (void) TIFFSetTagExtender(tag_extender);
+#endif
+      if (MagickDeleteThreadKey(tiff_exception) == MagickFalse)
+        ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
+      instantiate_key=MagickFalse;
+    }
   UnlockSemaphoreInfo(tiff_semaphore);
   DestroySemaphoreInfo(&tiff_semaphore);
 }