Skip to content
Snippets Groups Projects
Commit 0f69668f authored by Yuri Kunde Schlesner's avatar Yuri Kunde Schlesner
Browse files

HID: Fix crash when pressing a key when the emulator is stopped

parent c4208c11
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,8 @@ static s16 next_circle_y = 0; ...@@ -30,6 +30,8 @@ static s16 next_circle_y = 0;
* Gets a pointer to the PadData structure inside HID shared memory * Gets a pointer to the PadData structure inside HID shared memory
*/ */
static inline PadData* GetPadData() { static inline PadData* GetPadData() {
if (g_shared_mem == nullptr)
return nullptr;
return reinterpret_cast<PadData*>(g_shared_mem->GetPointer().ValueOr(nullptr)); return reinterpret_cast<PadData*>(g_shared_mem->GetPointer().ValueOr(nullptr));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment