summaryrefslogtreecommitdiff
path: root/src/actions/windows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/windows.cpp')
-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;