[Supertux-Commit] r5417 - trunk/supertux/src/gui

grumbel at millhouse.dreamhost.com grumbel at millhouse.dreamhost.com
Mon May 5 10:38:27 PDT 2008


Author: grumbel
Date: 2008-05-05 10:38:26 -0700 (Mon, 05 May 2008)
New Revision: 5417

Modified:
   trunk/supertux/src/gui/menu.cpp
Log:
Fixed game crashing when leaving the worldmap

Modified: trunk/supertux/src/gui/menu.cpp
===================================================================
--- trunk/supertux/src/gui/menu.cpp	2008-05-05 17:31:48 UTC (rev 5416)
+++ trunk/supertux/src/gui/menu.cpp	2008-05-05 17:38:26 UTC (rev 5417)
@@ -206,8 +206,12 @@
   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()




More information about the Supertux-Commit mailing list