xsane/xsane-0.998-xsane_update_param-crash.patch
2012-08-16 11:29:27 +02:00

33 lines
913 B
Diff

From 938a34622a88064b3803a67967de143ba3c01e9f Mon Sep 17 00:00:00 2001
From: Nils Philippsen <nils@redhat.com>
Date: Fri, 2 Sep 2011 11:55:59 +0200
Subject: [PATCH] patch: xsane_update_param-crash
Squashed commit of the following:
commit 74add0ef72c6c510220679751e5770eaff8710fd
Author: Nils Philippsen <nils@redhat.com>
Date: Mon Apr 4 11:13:20 2011 +0200
don't dereference xsane.preview if it is NULL
---
src/xsane-front-gtk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/xsane-front-gtk.c b/src/xsane-front-gtk.c
index 08761a0..66a3177 100644
--- a/src/xsane-front-gtk.c
+++ b/src/xsane-front-gtk.c
@@ -1713,7 +1713,7 @@ void xsane_update_param(void *arg)
gtk_label_set(GTK_LABEL(xsane.info_label), buf);
- if (xsane.preview->surface_unit == SANE_UNIT_MM)
+ if (xsane.preview && xsane.preview->surface_unit == SANE_UNIT_MM)
{
double dx, dy;
--
1.7.11.4