aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/guiFormSpecMenu.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index 330124fe1..3fe3c5cc2 100644
--- a/src/guiFormSpecMenu.cpp
+++ b/src/guiFormSpecMenu.cpp
@@ -3296,8 +3296,9 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
{
if (event.EventType==EET_KEY_INPUT_EVENT) {
KeyPress kp(event.KeyInput);
- if (event.KeyInput.PressedDown && ( (kp == EscapeKey) ||
- (kp == getKeySetting("keymap_inventory")) || (kp == CancelKey))) {
+ if (event.KeyInput.PressedDown && (
+ (kp == EscapeKey) || (kp == CancelKey) ||
+ ((m_client != NULL) && (kp == getKeySetting("keymap_inventory"))))) {
tryClose();
return true;
} else if (m_client != NULL && event.KeyInput.PressedDown &&