From: Ingo Ruhnke Date: Mon, 5 May 2008 17:38:26 +0000 (+0000) Subject: Fixed game crashing when leaving the worldmap X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0262a9c0ae29d375e8174038d8cc81ebbeb10215;p=supertux.git Fixed game crashing when leaving the worldmap SVN-Revision: 5417 --- diff --git a/src/gui/menu.cpp b/src/gui/menu.cpp index 00500b05f..ce8ff6323 100644 --- a/src/gui/menu.cpp +++ b/src/gui/menu.cpp @@ -206,8 +206,12 @@ Menu::~Menu() for(std::vector::iterator i = items.begin(); i != items.end(); ++i) delete *i; + if(current_ == this) current_ = NULL; + + if (previous == this) + previous = NULL; } Menu::Menu()