Skip to content

Commit

Permalink
possibly more robust deleting of special pages?
Browse files Browse the repository at this point in the history
  • Loading branch information
ZXGuesser committed Sep 29, 2017
1 parent f87806e commit 3872ae4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion specialpages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3872ae4

Please sign in to comment.