[gthumb] check if image is null before using it
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] check if image is null before using it
- Date: Sun, 19 Sep 2021 15:52:36 +0000 (UTC)
commit 1571cc4b961d9355fb90ef5934a3049b7062e597
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Sep 19 17:41:42 2021 +0200
check if image is null before using it
Fixes https://gitlab.gnome.org/GNOME/gthumb/-/issues/189
gthumb/gth-image-viewer.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gthumb/gth-image-viewer.c b/gthumb/gth-image-viewer.c
index d8e8aad5..1c60022a 100644
--- a/gthumb/gth-image-viewer.c
+++ b/gthumb/gth-image-viewer.c
@@ -1618,6 +1618,8 @@ _gth_image_viewer_set_original_size (GthImageViewer *self,
int image_height;
image = gth_image_viewer_get_current_image (self);
+ if (image == NULL)
+ return;
image_width = cairo_image_surface_get_width (image);
image_height = cairo_image_surface_get_height (image);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]