summaryrefslogtreecommitdiff
path: root/src/actions/actions.cpp
diff options
context:
space:
mode:
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)