From 0f69668fc61f7453b4c6451186b515762532c35a Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 31 Jan 2015 16:13:23 -0200 Subject: HID: Fix crash when pressing a key when the emulator is stopped --- src/core/hle/service/hid/hid.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/hle/service/hid/hid.cpp') diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 835055af..b6e4861d 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -30,6 +30,8 @@ static s16 next_circle_y = 0; * Gets a pointer to the PadData structure inside HID shared memory */ static inline PadData* GetPadData() { + if (g_shared_mem == nullptr) + return nullptr; return reinterpret_cast(g_shared_mem->GetPointer().ValueOr(nullptr)); } -- cgit v1.2.3