From 17024c40563a46d14446692da2605ff9a68e988d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 11 Jul 2015 22:03:21 +0200 Subject: [PATCH] (input_overlay.c) Attemp to simplify input_overlay_load_texture_image --- input/input_overlay.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/input/input_overlay.c b/input/input_overlay.c index 3eb9c7dec3..217309e4e6 100644 --- a/input/input_overlay.c +++ b/input/input_overlay.c @@ -307,12 +307,11 @@ static void input_overlay_free_overlays(input_overlay_t *ol) static bool input_overlay_load_texture_image(struct overlay *overlay, struct texture_image *image, const char *path) { - struct texture_image img = {0}; - - if (!texture_image_load(&img, path)) + if (!image) + return false; + if (!texture_image_load(image, path)) return false; - *image = img; overlay->load_images[overlay->load_images_size++] = *image; return true;