don't crash if no files are selected, take two
This commit is contained in:
parent
5950d2feb5
commit
790be67200
@ -1,7 +1,19 @@
|
||||
diff -up xsane-0.997/src/xsane-back-gtk.c.no-file-selected xsane-0.997/src/xsane-back-gtk.c
|
||||
--- xsane-0.997/src/xsane-back-gtk.c.no-file-selected 2002-10-02 13:05:52.000000000 +0200
|
||||
+++ xsane-0.997/src/xsane-back-gtk.c 2010-06-28 10:49:29.302391248 +0200
|
||||
@@ -1501,12 +1501,19 @@ int xsane_back_gtk_get_filename(const ch
|
||||
+++ xsane-0.997/src/xsane-back-gtk.c 2010-07-13 10:02:09.468118791 +0200
|
||||
@@ -1111,6 +1111,11 @@ static void xsane_back_gtk_filetype2_cal
|
||||
|
||||
chooser_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(filechooser));
|
||||
|
||||
+ if (!chooser_filename)
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
if ((new_filetype) && (*new_filetype))
|
||||
{
|
||||
extension = strrchr(chooser_filename, '.');
|
||||
@@ -1501,12 +1506,19 @@ int xsane_back_gtk_get_filename(const ch
|
||||
#endif
|
||||
|
||||
chooser_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(filechooser));
|
||||
@ -27,7 +39,7 @@ diff -up xsane-0.997/src/xsane-back-gtk.c.no-file-selected xsane-0.997/src/xsane
|
||||
gtk_widget_destroy(filechooser);
|
||||
diff -up xsane-0.997/src/xsane-front-gtk.c.no-file-selected xsane-0.997/src/xsane-front-gtk.c
|
||||
--- xsane-0.997/src/xsane-front-gtk.c.no-file-selected 2002-10-02 13:04:33.000000000 +0200
|
||||
+++ xsane-0.997/src/xsane-front-gtk.c 2010-06-28 10:46:31.025142803 +0200
|
||||
+++ xsane-0.997/src/xsane-front-gtk.c 2010-07-13 09:59:31.005868940 +0200
|
||||
@@ -1339,7 +1339,11 @@ static void xsane_browse_filename_callba
|
||||
snprintf(windowname, sizeof(windowname), "%s %s %s", xsane.prog_name, WINDOW_OUTPUT_FILENAME, xsane.device_text);
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
Name: xsane
|
||||
Summary: X Window System front-end for the SANE scanner interface
|
||||
Version: 0.997
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
Source0: http://www.xsane.org/download/%{name}-%{version}.tar.gz
|
||||
Source1: xsane.desktop
|
||||
# distro-specific: use "xdg-open" instead of "netscape" to launch help browser
|
||||
@ -28,7 +28,7 @@ Patch2: xsane-0.996-no-eula.patch
|
||||
# submitted to upstream (Oliver Rauch) via email, 2010-06-23
|
||||
Patch3: xsane-0.997-off-root-build.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=608047
|
||||
# submitted to upstream (Oliver Rauch) via email, 2010-06-28
|
||||
# submitted to upstream (Oliver Rauch) via email, 2010-07-13
|
||||
Patch4: xsane-0.997-no-file-selected.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=198422
|
||||
# submitted to upstream (Oliver Rauch) via email, 2010-06-29
|
||||
@ -159,7 +159,10 @@ fi
|
||||
%{_datadir}/sane/xsane
|
||||
|
||||
%changelog
|
||||
* Mon Jul 09 2010 Nils Philippsen <nils@redhat.com> - 0.997-9
|
||||
* Tue Jul 13 2010 Nils Philippsen <nils@redhat.com> - 0.997-10
|
||||
- don't crash if no files are selected, take two
|
||||
|
||||
* Mon Jul 12 2010 Nils Philippsen <nils@redhat.com> - 0.997-9
|
||||
- distribute license and other documentation with xsane-common
|
||||
|
||||
* Tue Jun 29 2010 Nils Philippsen <nils@redhat.com> 0.997-8
|
||||
|
Loading…
Reference in New Issue
Block a user