summaryrefslogtreecommitdiff
path: root/src/core/hid
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-12-16 11:46:51 -0500
committerGitHub <noreply@github.com>2023-12-16 11:46:51 -0500
commitb8f83aa4bf13f6783e31f190d530ef7be527bf49 (patch)
tree952d90666b0d253dce28742197d053d1db213eeb /src/core/hid
parent85b1e17df68adae7fe35e3ed190866e434d5113f (diff)
parente8ad603cd9eb198911787f747cdea38d424da838 (diff)
Merge pull request #12359 from german77/real_shared
service: hid: Allow to create multiple instances of shared memory
Diffstat (limited to 'src/core/hid')
-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)
InputInterpreter::~InputInterpreter() = default;
void InputInterpreter::PollInput() {
+ if (npad == nullptr) {
+ return;
+ }
const auto button_state = npad->GetAndResetPressState();
previous_index = current_index;