From 7b70046e7ab7329d93f800fe4b074fabff998a0e Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Fri, 9 Oct 2009 09:33:43 +0000 Subject: 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/branches/v3_4@23036 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 */ -- cgit v1.2.3