summaryrefslogtreecommitdiffstats
path: root/apps/gui/statusbar-skinned.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-08-16 12:53:29 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-08-16 12:53:29 +0000
commit2cc6b5a79db0d96718d2f1b14eddeda4a5237198 (patch)
treef92ff6807f1b624cf38d720baa0e1afb720571b0 /apps/gui/statusbar-skinned.c
parentb5412c9440a1d9f89a837e45cc8c2fd9c7854e33 (diff)
downloadrockbox-2cc6b5a79db0d96718d2f1b14eddeda4a5237198.tar.gz
rockbox-2cc6b5a79db0d96718d2f1b14eddeda4a5237198.tar.bz2
rockbox-2cc6b5a79db0d96718d2f1b14eddeda4a5237198.zip
Fix FS#11524 - a sbs could crash on load
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27829 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/statusbar-skinned.c')
-rw-r--r--apps/gui/statusbar-skinned.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c
index 4dce84b787..8928378781 100644
--- a/apps/gui/statusbar-skinned.c
+++ b/apps/gui/statusbar-skinned.c
@@ -112,6 +112,12 @@ void sb_skin_data_load(enum screen_type screen, const char *buf, bool isfile)
struct wps_data *data = sb_skin[screen].data;
int success;
+ /* We need to disable the theme here or else viewport_set_defaults()
+ * (which is called in the viewport tag parser) will crash because
+ * the theme is enabled but sb_set_info_vp() isnt set untill after the sbs
+ * is parsed. This only affects the default viewport which is ignored
+ * int he sbs anyway */
+ viewportmanager_theme_enable(screen, false, NULL);
success = buf && skin_data_load(screen, data, buf, isfile);
if (success)
@@ -136,6 +142,7 @@ void sb_skin_data_load(enum screen_type screen, const char *buf, bool isfile)
if (!success && isfile)
sb_create_from_settings(screen);
+ viewportmanager_theme_undo(screen, false);
}
static char *infovp_label[NB_SCREENS];
static char *oldinfovp_label[NB_SCREENS];