If CloneImage() raises an exception, skip immediately to the next image rather than...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 1 Jan 2008 14:50:11 +0000 (14:50 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 1 Jan 2008 14:50:11 +0000 (14:50 +0000)
git-svn-id: http://svn.voria.com/code@1245 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/modules/mod_magickpp/trgt_magickpp.cpp

index 23df13c..e6da708 100644 (file)
@@ -69,18 +69,18 @@ MagickLib::Image* copy_image_list(Container& container)
                try
                {
                        current = CloneImage(iter->image(), 0, 0, Magick::MagickTrue, &exceptionInfo);
+
+                       if (!first) first = current;
+
+                       current->previous = previous;
+                       current->next     = 0;
+
+                       if ( previous != 0) previous->next = current;
+                       previous = current;
                }
                catch(Magick::Warning warning) {
                        synfig::warning("exception '%s'", warning.what());
                }
-                       
-               if (!first) first = current;
-
-               current->previous = previous;
-               current->next     = 0;
-
-               if ( previous != 0) previous->next = current;
-               previous = current;
        }
 
        return first;