From: cristy Date: Sun, 7 Jul 2013 22:30:56 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~3530 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=12a2ee6a4abc8c80a5bda9e282599d03d20478d3;p=imagemagick --- diff --git a/Magick++/lib/Magick++/STL.h b/Magick++/lib/Magick++/STL.h index bc629a8ff..8dd6f4e22 100644 --- a/Magick++/lib/Magick++/STL.h +++ b/Magick++/lib/Magick++/STL.h @@ -1858,25 +1858,23 @@ namespace Magick MagickCore::Image* previous = 0; ::ssize_t scene = 0; for ( InputIterator iter = first_; iter != last_; ++iter ) - { - // Unless we reduce the reference count to one, the same image - // structure may occur more than once in the container, causing - // the linked list to fail. - iter->modifyImage(); - - MagickCore::Image* current = iter->image(); + { + // Unless we reduce the reference count to one, the same image + // structure may occur more than once in the container, causing + // the linked list to fail. + iter->modifyImage(); - current->previous = previous; - current->next = 0; + MagickCore::Image* current = iter->image(); - if ( previous != 0) - previous->next = current; + current->previous = previous; + current->next = 0; + current->scene = scene++; - current->scene=scene; - ++scene; + if ( previous != 0) + previous->next = current; - previous = current; - } + previous = current; + } } // Remove links added by linkImages. This should be called after the