From 0262a9c0ae29d375e8174038d8cc81ebbeb10215 Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Mon, 5 May 2008 17:38:26 +0000 Subject: [PATCH] Fixed game crashing when leaving the worldmap SVN-Revision: 5417 --- src/gui/menu.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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() -- 2.11.0