summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-01 11:17:41 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-01 11:17:41 +0000
commit361a7cb45ec817b5fc4c8d35070cad527ba9cc51 (patch)
treea4322e9e90938731f02904bd9953025b080ee60d /src/gui/gui.cpp
parentf588a615a5a33032047324411940e87267fc2ef9 (diff)
downloadmana-361a7cb45ec817b5fc4c8d35070cad527ba9cc51.tar.gz
mana-361a7cb45ec817b5fc4c8d35070cad527ba9cc51.tar.bz2
mana-361a7cb45ec817b5fc4c8d35070cad527ba9cc51.tar.xz
mana-361a7cb45ec817b5fc4c8d35070cad527ba9cc51.zip
Adding safety check to walk check.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 5ef31a78..625d348f 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -103,7 +103,7 @@ void Gui::mousePress(int mx, int my, int button)
// Mouse pressed on window container (basically, the map)
// When conditions for walking are met, set new player destination
- if (player_node->action != DEAD && current_npc == 0 &&
+ if (player_node && player_node->action != DEAD && current_npc == 0 &&
button == gcn::MouseInput::LEFT)
{
int tilex = mx / 32 + camera_x;