[gthumb] preloader: check whether the image is null before using it



commit e103a04988c778f7ef217dae5787d75c8161b9fe
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sat Oct 12 20:13:12 2013 +0200

    preloader: check whether the image is null before using it

 gthumb/gth-image-preloader.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gthumb/gth-image-preloader.c b/gthumb/gth-image-preloader.c
index f4b3352..f5635c7 100644
--- a/gthumb/gth-image-preloader.c
+++ b/gthumb/gth-image-preloader.c
@@ -603,7 +603,7 @@ image_loader_ready_cb (GObject      *source_object,
        if ((request->requested_size > 0) && loaded_original)
                load_data->resize_to_requested_size = TRUE;
 
-       if (gth_image_get_is_zoomable (image) || gth_image_get_is_animation (image))
+       if ((image != NULL) && (gth_image_get_is_zoomable (image) || gth_image_get_is_animation (image)))
                load_data->resize_to_requested_size = FALSE;
 
        resized = FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]