summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-11-27 11:50:07 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-11-27 11:50:07 +0000
commit494860cfd4a8803a28f0dfe604efbf2b9b811d8d (patch)
treee2faa26e9954aa65cbfc91a03c4e54a4dbea6f0e /apps
parent6cf7cb9822782295091fb083eab1f2862500b53b (diff)
Free a handle when we try to load a backdrop file which doesnt exist or cant be loaded
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31070 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/skin_engine/skin_backdrops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_backdrops.c b/apps/gui/skin_engine/skin_backdrops.c
index 0433d0258d..8e23b8da67 100644
--- a/apps/gui/skin_engine/skin_backdrops.c
+++ b/apps/gui/skin_engine/skin_backdrops.c
@@ -160,7 +160,11 @@ bool skin_backdrops_preload(void)
screens[screen].backdrop_load(filename, backdrops[i].buffer);
handle_being_loaded = -1;
if (!backdrops[i].loaded)
+ {
+ core_free(backdrops[i].buflib_handle);
retval = false;
+ backdrops[i].buflib_handle = -1;
+ }
}
else
retval = false;