Fixed game crashing when leaving the worldmap
authorIngo Ruhnke <grumbel@gmx.de>
Mon, 5 May 2008 17:38:26 +0000 (17:38 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Mon, 5 May 2008 17:38:26 +0000 (17:38 +0000)
SVN-Revision: 5417

src/gui/menu.cpp

index 00500b0..ce8ff63 100644 (file)
@@ -206,8 +206,12 @@ Menu::~Menu()
   for(std::vector<MenuItem*>::iterator i = items.begin();
       i != items.end(); ++i)
     delete *i;
+
   if(current_ == this)
     current_ = NULL;
+
+  if (previous == this)
+    previous = NULL;
 }
 
 Menu::Menu()