From 747d826a7618fcb388fc03344c23054982e3feb2 Mon Sep 17 00:00:00 2001 From: dooglus Date: Tue, 1 Jan 2008 14:50:11 +0000 Subject: [PATCH] If CloneImage() raises an exception, skip immediately to the next image rather than using the uninitialised variable 'current'. git-svn-id: http://svn.voria.com/code@1245 1f10aa63-cdf2-0310-b900-c93c546f37ac --- .../trunk/src/modules/mod_magickpp/trgt_magickpp.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/synfig-core/trunk/src/modules/mod_magickpp/trgt_magickpp.cpp b/synfig-core/trunk/src/modules/mod_magickpp/trgt_magickpp.cpp index 23df13c..e6da708 100644 --- a/synfig-core/trunk/src/modules/mod_magickpp/trgt_magickpp.cpp +++ b/synfig-core/trunk/src/modules/mod_magickpp/trgt_magickpp.cpp @@ -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; -- 2.7.4