summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-04-28 23:18:17 +0300
committerAndrei Karas <akaras@inbox.ru>2017-04-28 23:18:17 +0300
commitdfefb83dedc4491ace627dc204f841ef8c6d7052 (patch)
tree29c1c5becdfb4e0c12a86fcace35f822e0f570fc /src/gui
parent15919532c723ca0186b0c0c932cd1b90c7d2e570 (diff)
downloadplus-dfefb83dedc4491ace627dc204f841ef8c6d7052.tar.gz
plus-dfefb83dedc4491ace627dc204f841ef8c6d7052.tar.bz2
plus-dfefb83dedc4491ace627dc204f841ef8c6d7052.tar.xz
plus-dfefb83dedc4491ace627dc204f841ef8c6d7052.zip
Add workaround to open npc buy shop if npc invisible.
For hercules it lost npc type.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/buyselldialog.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/windows/buyselldialog.cpp b/src/gui/windows/buyselldialog.cpp
index 6969b8fc0..0914dc43e 100644
--- a/src/gui/windows/buyselldialog.cpp
+++ b/src/gui/windows/buyselldialog.cpp
@@ -133,7 +133,10 @@ void BuySellDialog::action(const ActionEvent &event)
if (mNpcId != BeingId_negOne)
{
const Being *const being = actorManager->findBeing(mNpcId);
- npcHandler->buy(being);
+ if (being)
+ npcHandler->buy(being);
+ else
+ npcHandler->buy(mNpcId);
}
else
{