summaryrefslogtreecommitdiffstats
path: root/src/core/hid
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-12-16 17:46:51 +0100
committerGitHub <noreply@github.com>2023-12-16 17:46:51 +0100
commitb8f83aa4bf13f6783e31f190d530ef7be527bf49 (patch)
tree952d90666b0d253dce28742197d053d1db213eeb /src/core/hid
parentssl: fix output byte buffer size issue (#12372) (diff)
parentcore: Make sure npad is initialized (diff)
downloadyuzu-b8f83aa4bf13f6783e31f190d530ef7be527bf49.tar
yuzu-b8f83aa4bf13f6783e31f190d530ef7be527bf49.tar.gz
yuzu-b8f83aa4bf13f6783e31f190d530ef7be527bf49.tar.bz2
yuzu-b8f83aa4bf13f6783e31f190d530ef7be527bf49.tar.lz
yuzu-b8f83aa4bf13f6783e31f190d530ef7be527bf49.tar.xz
yuzu-b8f83aa4bf13f6783e31f190d530ef7be527bf49.tar.zst
yuzu-b8f83aa4bf13f6783e31f190d530ef7be527bf49.zip
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;