2015-09-14 17:13 GMT+02:00 Igor Mironchik <igor.mironc...@gmail.com>:
> Hi,
>
> it seems that problem not in the iterating and deletion from cantainer...

Yes it is. As Andre told you, erasing from the list invalidates
iterators, including the one returned by end(). As you cache the "end"
iterator in the "last" variable at the start of the loop, after the
first erase you are working with an invalid iterator, and probably
iterate past the end of your list. As a rule, never save the "end"
iterator in a variable if you're going to modify your container.

The fix is to use "while (it != images.end()) {".
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to