From f58c171428e840c2a6f3ac8545ec79d741d76a92 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 12 Jul 2015 01:19:58 +0200 Subject: [PATCH] (task_overlay.c) Cleanups --- tasks/task_overlay.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tasks/task_overlay.c b/tasks/task_overlay.c index c7dd0db924..359c670420 100644 --- a/tasks/task_overlay.c +++ b/tasks/task_overlay.c @@ -27,14 +27,15 @@ static slock_t *overlay_lock; void rarch_main_data_overlay_image_upload_iterate(bool is_thread) { - input_overlay_t *ol = input_overlay_get_ptr(); - if (!ol) - return; + input_overlay_t *ol = NULL; #ifdef HAVE_THREADS if (is_thread) slock_lock(overlay_lock); #endif + ol = input_overlay_get_ptr(); + if (!ol) + return; switch (input_overlay_status(ol)) { @@ -53,12 +54,13 @@ void rarch_main_data_overlay_image_upload_iterate(bool is_thread) void rarch_main_data_overlay_iterate(bool is_thread) { - input_overlay_t *ol = input_overlay_get_ptr(); + input_overlay_t *ol = NULL; #ifdef HAVE_THREADS if (is_thread) slock_lock(overlay_lock); #endif + ol = input_overlay_get_ptr(); if (!ol) goto end;