From 494860cfd4a8803a28f0dfe604efbf2b9b811d8d Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sun, 27 Nov 2011 11:50:07 +0000 Subject: 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 --- apps/gui/skin_engine/skin_backdrops.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apps') 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; -- cgit v1.2.3