summaryrefslogtreecommitdiff
path: root/src/actions/actions.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-17 02:48:54 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-17 02:48:54 +0300
commit53cc3c86f2b5040cec577145feff9db2c93bd268 (patch)
tree44d3d91d85d9c10fbb8aa5636b0e72ebfea0c76f /src/actions/actions.cpp
parent26f2c689298bb2077000b81ff3fe14328a89feb8 (diff)
downloadplus-53cc3c86f2b5040cec577145feff9db2c93bd268.tar.gz
plus-53cc3c86f2b5040cec577145feff9db2c93bd268.tar.bz2
plus-53cc3c86f2b5040cec577145feff9db2c93bd268.tar.xz
plus-53cc3c86f2b5040cec577145feff9db2c93bd268.zip
Fix some issues after automatic checks.
Diffstat (limited to 'src/actions/actions.cpp')
-rw-r--r--src/actions/actions.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index d2905a27e..7121b138d 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -639,6 +639,9 @@ impHandler(buy)
return false;
}
+ if (!being)
+ return false;
+
if (being->getType() == ActorType::Npc)
{
npcHandler->buy(being->getId());
@@ -672,6 +675,9 @@ impHandler(sell)
return false;
}
+ if (!being)
+ return false;
+
if (being->getType() == ActorType::Npc)
{
npcHandler->sell(being->getId());
@@ -696,15 +702,11 @@ impHandler(talk)
if (!being)
return false;
- if (being)
- {
- if (being->canTalk())
- being->talkTo();
- else if (being->getType() == ActorType::Player)
- new BuySellDialog(being->getName());
- return true;
- }
- return false;
+ if (being->canTalk())
+ being->talkTo();
+ else if (being->getType() == ActorType::Player)
+ new BuySellDialog(being->getName());
+ return true;
}
impHandler0(stopAttack)