summaryrefslogtreecommitdiff
path: root/src/touchactions.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-08 00:56:55 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-08 00:56:55 +0300
commitd7ab0cbc8e0a854159f5cf45ebf87573d416c95b (patch)
tree8740275b9658ffc53dd5645d2477812ae44b7d64 /src/touchactions.cpp
parenta4c27efaf039707e29784ae8f828bdd93a5b2935 (diff)
downloadplus-d7ab0cbc8e0a854159f5cf45ebf87573d416c95b.tar.gz
plus-d7ab0cbc8e0a854159f5cf45ebf87573d416c95b.tar.bz2
plus-d7ab0cbc8e0a854159f5cf45ebf87573d416c95b.tar.xz
plus-d7ab0cbc8e0a854159f5cf45ebf87573d416c95b.zip
Add missing check to touchactions.
Diffstat (limited to 'src/touchactions.cpp')
-rw-r--r--src/touchactions.cpp9
1 files changed, 6 insertions, 3 deletions
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);
+ }
}