mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-20 19:44:30 -04:00
HID: Fix crash when pressing a key when the emulator is stopped
This commit is contained in:
@@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user