Fix crash when no world is selected and configure button is pressed.
authorJürgen Doser <jurgen.doser@gmail.com>
Tue, 22 Jan 2013 16:03:38 +0000 (17:03 +0100)
committerJürgen Doser <jurgen.doser@gmail.com>
Tue, 22 Jan 2013 16:47:12 +0000 (17:47 +0100)
by moving return statement out of if-then-else clause...

src/guiMainMenu.cpp

index 77a5a85b87df810ac91c0873dfc37e8ba8085823..68ee990cd1d46a5753b21de0dd9be42178010445 100644 (file)
@@ -1048,8 +1048,8 @@ bool GUIMainMenu::OnEvent(const SEvent& event)
                                        GUIConfigureWorld *menu = new GUIConfigureWorld(env, parent,
                                                                                -1, menumgr, wspec);
                                        menu->drop();
-                                       return true;
                                }
+                               return true;
                        }
                        case GUI_ID_SERVERLIST_DELETE: {
                                gui::IGUIListBox *serverlist = (gui::IGUIListBox*)getElementFromId(GUI_ID_SERVERLIST);