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
This commit is contained in:
Jonathan Gordon 2011-11-27 11:50:07 +00:00
parent 6cf7cb9822
commit 494860cfd4

View file

@ -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;