summaryrefslogtreecommitdiff
path: root/src/inputmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inputmanager.cpp')
-rw-r--r--src/inputmanager.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/inputmanager.cpp b/src/inputmanager.cpp
index 8a9e89995..e7ac40cf0 100644
--- a/src/inputmanager.cpp
+++ b/src/inputmanager.cpp
@@ -489,8 +489,11 @@ bool InputManager::handleEvent(const SDL_Event &event)
break;
case SDL_JOYBUTTONDOWN:
- if (triggerAction(joystick->getActionVector(event)))
- return true;
+ if (joystick && joystick->validate())
+ {
+ if (triggerAction(joystick->getActionVector(event)))
+ return true;
+ }
break;
default:
break;