summaryrefslogtreecommitdiffstats
path: root/apps/gui/skin_engine/skin_engine.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-11-28 10:44:16 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-11-28 10:44:16 +0000
commit25bce232f2883d2bba47fa9b908d1b95ee71cd3a (patch)
treefac5237909c87908e159b145ea86041ef4349ea5 /apps/gui/skin_engine/skin_engine.c
parente5a7388fc71c551e00e9abc6b2e25402acf8829b (diff)
downloadrockbox-25bce232f2883d2bba47fa9b908d1b95ee71cd3a.tar.gz
rockbox-25bce232f2883d2bba47fa9b908d1b95ee71cd3a.zip
Fix FS#12408 - don't load skins too early causing buflib handles to leak
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31080 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_engine.c')
-rw-r--r--apps/gui/skin_engine/skin_engine.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_engine.c b/apps/gui/skin_engine/skin_engine.c
index 0186471550..e28e4fbbf4 100644
--- a/apps/gui/skin_engine/skin_engine.c
+++ b/apps/gui/skin_engine/skin_engine.c
@@ -43,6 +43,7 @@
void skin_data_free_buflib_allocs(struct wps_data *wps_data);
char* wps_default_skin(enum screen_type screen);
char* default_radio_skin(enum screen_type screen);
+static bool skins_initialised = false;
static char* get_skin_filename(char *buf, size_t buf_size,
enum skinnable_screens skin, enum screen_type screen);
@@ -131,6 +132,8 @@ void settings_apply_skins(void)
#ifdef HAVE_LCD_BITMAP
skin_backdrop_init();
#endif
+ skins_initialised = true;
+
/* Make sure each skin is loaded */
for (i=0; i<SKINNABLE_SCREENS_COUNT; i++)
{
@@ -265,6 +268,9 @@ static char* get_skin_filename(char *buf, size_t buf_size,
struct gui_wps *skin_get_gwps(enum skinnable_screens skin, enum screen_type screen)
{
+ if (skin == CUSTOM_STATUSBAR && !skins_initialised)
+ return &skins[skin][screen].gui_wps;
+
if (skins[skin][screen].data.wps_loaded == false)
{
char filename[MAX_PATH];