aboutsummaryrefslogtreecommitdiff
path: root/src/guiEngine.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2013-07-03 01:25:26 -0400
committerkwolekr <kwolekr@minetest.net>2013-07-03 01:25:26 -0400
commita225efaec549f9b2b6d6a876b81279868abb18ba (patch)
tree690e2c7f56ce4c73ced3cf3c62fe98c825243ecc /src/guiEngine.cpp
parentad4c0653449f2d464608dbb75b2798273fd4fe08 (diff)
downloadminetest-a225efaec549f9b2b6d6a876b81279868abb18ba.tar.gz
minetest-a225efaec549f9b2b6d6a876b81279868abb18ba.tar.bz2
minetest-a225efaec549f9b2b6d6a876b81279868abb18ba.zip
Lua main menu: Fix crash on init lua error, mapgen dropdown index, and new worlds not saving index
Diffstat (limited to 'src/guiEngine.cpp')
-rw-r--r--src/guiEngine.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/guiEngine.cpp b/src/guiEngine.cpp
index f04f15820..2c5000d8b 100644
--- a/src/guiEngine.cpp
+++ b/src/guiEngine.cpp
@@ -299,6 +299,8 @@ GUIEngine::~GUIEngine()
{
video::IVideoDriver* driver = m_device->getVideoDriver();
assert(driver != 0);
+
+ //TODO: clean up m_menu here
lua_close(m_engineluastack);
@@ -309,8 +311,9 @@ GUIEngine::~GUIEngine()
if (m_textures[i] != 0)
driver->removeTexture(m_textures[i]);
}
-
- m_cloud.clouds->drop();
+
+ if (m_cloud.clouds)
+ m_cloud.clouds->drop();
}
/******************************************************************************/