aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-01-11 11:39:25 +0100
committerEugene Sandulenko2016-01-11 11:39:25 +0100
commitc3685046465dacdde6ae8e060b5465a9adf249c2 (patch)
treef899124250475af2769c6f662a2d795e5c4f9310
parent856a4e1eb3a988e40e2cea4845c0b13adf69717a (diff)
downloadscummvm-rg350-c3685046465dacdde6ae8e060b5465a9adf249c2.tar.gz
scummvm-rg350-c3685046465dacdde6ae8e060b5465a9adf249c2.tar.bz2
scummvm-rg350-c3685046465dacdde6ae8e060b5465a9adf249c2.zip
WAGE: Added safeguards to avoid future mistakes
-rw-r--r--engines/wage/menu.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/wage/menu.cpp b/engines/wage/menu.cpp
index fab8d04ebb..ade2b79935 100644
--- a/engines/wage/menu.cpp
+++ b/engines/wage/menu.cpp
@@ -87,6 +87,9 @@ Menu::Menu(Gui *gui) : _gui(gui) {
MenuItem *commands = new MenuItem("Commands");
_items.push_back(commands);
+ assert(_gui->_engine);
+ assert(_gui->_engine->_world);
+
if (!_gui->_engine->_world->_weaponMenuDisabled) {
MenuItem *weapons = new MenuItem("Weapons");
_items.push_back(weapons);