From 361a7cb45ec817b5fc4c8d35070cad527ba9cc51 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 1 May 2005 11:17:41 +0000 Subject: Adding safety check to walk check. --- src/gui/gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2