diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-08 00:56:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-08 00:56:55 +0300 |
commit | d7ab0cbc8e0a854159f5cf45ebf87573d416c95b (patch) | |
tree | 8740275b9658ffc53dd5645d2477812ae44b7d64 /src/touchactions.cpp | |
parent | a4c27efaf039707e29784ae8f828bdd93a5b2935 (diff) | |
download | manaplus-d7ab0cbc8e0a854159f5cf45ebf87573d416c95b.tar.gz manaplus-d7ab0cbc8e0a854159f5cf45ebf87573d416c95b.tar.bz2 manaplus-d7ab0cbc8e0a854159f5cf45ebf87573d416c95b.tar.xz manaplus-d7ab0cbc8e0a854159f5cf45ebf87573d416c95b.zip |
Add missing check to touchactions.
Diffstat (limited to 'src/touchactions.cpp')
-rw-r--r-- | src/touchactions.cpp | 9 |
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); + } } |