summaryrefslogtreecommitdiff
path: root/src/inputmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inputmanager.cpp')
-rw-r--r--src/inputmanager.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/inputmanager.cpp b/src/inputmanager.cpp
index 12993c0cb..8a9e89995 100644
--- a/src/inputmanager.cpp
+++ b/src/inputmanager.cpp
@@ -521,7 +521,7 @@ int InputManager::getInputConditionMask()
if (Game::instance()->getValidSpeed())
mask += COND_VALIDSPEED;
- if (!gui->getFocusHandler()->getModalFocused())
+ if (gui && !gui->getFocusHandler()->getModalFocused())
mask += COND_NOMODAL;
NpcDialog *dialog = NpcDialog::getActive();
@@ -536,6 +536,10 @@ int InputManager::getInputConditionMask()
{
mask += COND_NOTARGET;
}
+
+ if (!player_node || player_node->getFollow().empty())
+ mask += COND_NOFOLLOW;
+
return mask;
}