summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 5df26d63..69563dc1 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -254,7 +254,8 @@ Gui::mousePress(int mx, int my, int button)
Being *being;
FloorItem *floorItem;
- if ((being = beingManager->findBeing(tilex, tiley)) && being->getType() != Being::LOCALPLAYER)
+ if ((being = beingManager->findBeing(tilex, tiley)) &&
+ being->getType() != Being::LOCALPLAYER)
{
showPopup(mx, my, being);
return;
@@ -307,7 +308,8 @@ Gui::mousePress(int mx, int my, int button)
player_node->pickUp(item);
}
// Just walk around
- else if (engine->getCurrentMap()->getWalk(tilex, tiley))
+ else if (engine->getCurrentMap() &&
+ engine->getCurrentMap()->getWalk(tilex, tiley))
{
// XXX XXX XXX REALLY UGLY!
Uint8 *keys = SDL_GetKeyState(NULL);