From baef536e29b53a8ced5c6158163ec72144893edd Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sat, 3 Oct 2009 22:09:27 +0000 Subject: [PATCH] Fix crash in early USB introduced in r22365 by moving the gui_syncstatusbar_init() back to where it needs to be. The comment clearly stated that it needs to happen that early. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22903 a1c6a512-1295-4272-9138-f99709370657 --- apps/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/main.c b/apps/main.c index c7510801d4..a93231e036 100644 --- a/apps/main.c +++ b/apps/main.c @@ -139,7 +139,6 @@ static void app_main(void) list_init(); #endif tree_gui_init(); - gui_syncstatusbar_init(&statusbars); viewportmanager_init(); #ifdef HAVE_USBSTACK /* All threads should be created and public queues registered by now */ @@ -310,6 +309,8 @@ static void init(void) #ifdef DEBUG debug_init(); #endif + /* Must be done before any code uses the multi-screen API */ + gui_syncstatusbar_init(&statusbars); storage_init(); settings_reset(); settings_load(SETTINGS_ALL); @@ -431,6 +432,9 @@ static void init(void) radio_init(); #endif + /* Must be done before any code uses the multi-screen API */ + gui_syncstatusbar_init(&statusbars); + #if CONFIG_CHARGING && (CONFIG_CPU == SH7034) /* charger_inserted() can't be used here because power_thread() hasn't checked power_input_status() yet */