mirror of
https://github.com/libretro/RetroArch
synced 2025-02-07 03:40:24 +00:00
Fix crash when system info is not yet available
This commit is contained in:
parent
519275e629
commit
53804e5c24
@ -237,9 +237,6 @@ void input_keyboard_event(bool down, unsigned code,
|
||||
uint32_t character, uint16_t mod, unsigned device)
|
||||
{
|
||||
static bool deferred_wait_keys;
|
||||
rarch_system_info_t *system = NULL;
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
||||
|
||||
if (deferred_wait_keys)
|
||||
{
|
||||
@ -283,7 +280,13 @@ void input_keyboard_event(bool down, unsigned code,
|
||||
/* Unblock all hotkeys. */
|
||||
input_driver_keyboard_mapping_set_block(false);
|
||||
}
|
||||
else if (system->key_event)
|
||||
system->key_event(down, code, character, mod);
|
||||
else
|
||||
{
|
||||
rarch_system_info_t *system = NULL;
|
||||
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
||||
|
||||
if (system && system->key_event)
|
||||
system->key_event(down, code, character, mod);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user