1
0
Fork 0
forked from len0rd/rockbox

plugins: playing time: fix possible crash on sys event

Change-Id: I7b3580c56e2b285f56b9e2195fbf3c14b6cd96e5
This commit is contained in:
Roman Artiukhin 2024-02-03 15:54:14 +02:00
parent 76ec55cc49
commit e122243bb0

View file

@ -351,8 +351,13 @@ static bool playing_time(void)
if (rb->list_do_action(CONTEXT_LIST, HZ/2, &pt_lists, &key) == 0
&& key!=ACTION_NONE && key!=ACTION_UNKNOWN)
{
bool usb = rb->default_event_handler(key) == SYS_USB_CONNECTED;
if (!usb && IS_SYSEVENT(key))
continue;
rb->talk_force_shutup();
return(rb->default_event_handler(key) == SYS_USB_CONNECTED);
return usb;
}
}