From d04804b6ff2d3dec54b73f410706b4b678ccdaa2 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Sun, 12 Dec 2021 18:18:04 +0100 Subject: Root menu: prevent infinite loop trying to exit plugin Rockbox could enter into an infinite loop when last_screen and next_screen were both GO_TO_PREVIOUS, which happened when trying to quit PictureFlow in the following scenario: 1) start playback from PictureFlow plugin 2) return (or be returned) to WPS directly 3) wait for playback to finish and to be returned to PF plugin Change-Id: I0b52d4df56d416f81cef027d9024e964a734fcdc --- apps/root_menu.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps') diff --git a/apps/root_menu.c b/apps/root_menu.c index e4020ae6c7..c10064499c 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c @@ -898,6 +898,8 @@ void root_menu(void) next_screen = last_screen; if (last_screen == GO_TO_PLUGIN)/* for WPS */ last_screen = GO_TO_PREVIOUS; + else if (last_screen == GO_TO_PREVIOUS) + next_screen = GO_TO_ROOT; break; } -- cgit v1.2.3