From d7ab0cbc8e0a854159f5cf45ebf87573d416c95b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 8 Dec 2012 00:56:55 +0300 Subject: Add missing check to touchactions. --- src/touchactions.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/touchactions.cpp') diff --git a/src/touchactions.cpp b/src/touchactions.cpp index ac3e45699..c88a25cf8 100644 --- a/src/touchactions.cpp +++ b/src/touchactions.cpp @@ -148,7 +148,10 @@ impHandler0(attackClick) impHandler0(cancelClick) { - ActionManager::stopAttack(tempEvent); - if (!player_node->getTarget()) - ActionManager::sit(tempEvent); + if (player_node) + { + ActionManager::stopAttack(tempEvent); + if (!player_node->getTarget()) + ActionManager::sit(tempEvent); + } } -- cgit v1.2.3-70-g09d2