MagickCore::Image* images = MagickCore::CoalesceImages( first_->image(),
exceptionInfo);
// Unlink image list
unlinkImages(first_, last_);
// Ensure container is empty
coalescedImages_->clear(); // first_ invalidation after clear
// Move images to container
insertImages( coalescedImages_, images );
// Report any error
ThrowPPException( first_->quiet()); //the program crashes here.first_ invalidation
my change is ok
MagickCore::Image* images = MagickCore::CoalesceImages( first_->image(),
exceptionInfo);
// Unlink image list
unlinkImages(first_, last_); bool quiet = first_->quiet();
// Ensure container is empty
coalescedImages_->clear();
// Move images to container
insertImages( coalescedImages_, images );
// Report any error
ThrowPPException(quiet);
STL list iterator not dereferencable
Re: STL list iterator not dereferencable
Thanks for reporting this. This was not the only spot where we made this mistake. We have applied your patch at all those spots. This will be resolved in the next release of ImageMagick.