diff --git a/specialpages.cpp b/specialpages.cpp index 7b131ac..a13fb43 100644 --- a/specialpages.cpp +++ b/specialpages.cpp @@ -20,9 +20,10 @@ void SpecialPages::addPage(TTXPageStream* p) void SpecialPages::deletePage(TTXPageStream* p) { + if (*_iter == p) + _iter--; // if iterator is pointing at this page wind it back _specialPagesList.remove(p); _page = nullptr; - _iter--; // roll back iterator in case this was the last in list } TTXPageStream* SpecialPages::NextPage()