2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

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

This commit is contained in:
Yuri Kunde Schlesner 2015-01-31 16:13:23 -02:00
parent c4208c1171
commit 0f69668fc6

View file

@ -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<PadData*>(g_shared_mem->GetPointer().ValueOr(nullptr));
}