summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-26 13:30:24 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-26 13:30:24 +0300
commit1a9330a5f6cd753b4155ac74db104cb0ffa095c9 (patch)
treed3d24cfc1101b99e2055a9330b2e31522512f0c3 /src/actions
parent793e570728840dd788f9104e54828c1530016d61 (diff)
downloadplus-1a9330a5f6cd753b4155ac74db104cb0ffa095c9.tar.gz
plus-1a9330a5f6cd753b4155ac74db104cb0ffa095c9.tar.bz2
plus-1a9330a5f6cd753b4155ac74db104cb0ffa095c9.tar.xz
plus-1a9330a5f6cd753b4155ac74db104cb0ffa095c9.zip
Allow open cart window only if cart status effect enabled.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/windows.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/actions/windows.cpp b/src/actions/windows.cpp
index 9a7743590..91d965748 100644
--- a/src/actions/windows.cpp
+++ b/src/actions/windows.cpp
@@ -22,6 +22,8 @@
#include "actions/actiondef.h"
+#include "being/localplayer.h"
+
#include "gui/dialogsmanager.h"
#include "gui/windows/bankwindow.h"
@@ -277,8 +279,12 @@ impHandler0(bankWindowShow)
impHandler0(cartWindowShow)
{
- if (!serverFeatures->haveCart())
+ if (!serverFeatures->haveCart()
+ || !localPlayer
+ || !localPlayer->getHaveCart())
+ {
return false;
+ }
showHideWindow(cartWindow);
return true;