This commit is contained in:
twinaphex 2016-01-23 21:57:14 +01:00
parent 91f7120604
commit 97e5d5c61b
1 changed files with 19 additions and 13 deletions

View File

@ -58,7 +58,7 @@ static bool rarch_task_overlay_load_texture_image(struct overlay *overlay,
{
if (!image)
return false;
if (!texture_image_load(image, path)) /* possibly unsafe on XBOX */
if (!texture_image_load(image, path))
return false;
overlay->load_images[overlay->load_images_size++] = *image;
@ -682,7 +682,7 @@ task_finished:
static bool rarch_task_push_overlay_load(const char *overlay_path,
rarch_task_callback_t cb, void *user_data)
{
rarch_task_t *t;
rarch_task_t *t = NULL;
overlay_loader_t *loader = (overlay_loader_t*)calloc(1, sizeof(*loader));
config_file_t *conf = config_file_new(overlay_path);
@ -705,6 +705,10 @@ static bool rarch_task_push_overlay_load(const char *overlay_path,
loader->pos_increment = (loader->size / 4) ? (loader->size / 4) : 4;
t = (rarch_task_t*)calloc(1, sizeof(*t));
if (!t)
goto error;
t->handler = rarch_task_overlay_handler;
t->state = loader;
t->callback = cb;
@ -719,6 +723,8 @@ error:
if (loader)
{
if (loader->overlay_path)
free(loader->overlay_path);
if (loader->overlays)
free(loader->overlays);
free(loader);