summaryrefslogtreecommitdiff
path: root/src/core/hid/input_interpreter.cpp
diff options
context:
space:
mode:
authorGravatar Narr the Reg2023-12-14 20:04:38 -0600
committerGravatar Narr the Reg2023-12-14 20:04:38 -0600
commite8ad603cd9eb198911787f747cdea38d424da838 (patch)
treec56b5098483f619bc95f67b0acaf1daf4189ccb5 /src/core/hid/input_interpreter.cpp
parentcore: hid: Clean up headers (diff)
downloadyuzu-e8ad603cd9eb198911787f747cdea38d424da838.tar.gz
yuzu-e8ad603cd9eb198911787f747cdea38d424da838.tar.xz
yuzu-e8ad603cd9eb198911787f747cdea38d424da838.zip
core: Make sure npad is initialized
Diffstat (limited to 'src/core/hid/input_interpreter.cpp')
-rw-r--r--src/core/hid/input_interpreter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/hid/input_interpreter.cpp b/src/core/hid/input_interpreter.cpp
index a6bdd28f2..072f38a68 100644
--- a/src/core/hid/input_interpreter.cpp
+++ b/src/core/hid/input_interpreter.cpp
@@ -20,6 +20,9 @@ InputInterpreter::InputInterpreter(Core::System& system)
20InputInterpreter::~InputInterpreter() = default; 20InputInterpreter::~InputInterpreter() = default;
21 21
22void InputInterpreter::PollInput() { 22void InputInterpreter::PollInput() {
23 if (npad == nullptr) {
24 return;
25 }
23 const auto button_state = npad->GetAndResetPressState(); 26 const auto button_state = npad->GetAndResetPressState();
24 27
25 previous_index = current_index; 28 previous_index = current_index;