[phatch/f14] Fix crash issue in #646035 new file: crash_fix.patch modified: phatch.spec

Lakshmi Narasimhan T V narasim at fedoraproject.org
Sat May 14 07:15:44 UTC 2011


commit f83aae23f069c5f607996187f41b6b14566fb6d5
Author: Lakshmi Narasimhan T V <lakshminaras2002 at gmail.com>
Date:   Sat May 14 12:44:57 2011 +0530

    Fix crash issue in #646035
    	new file:   crash_fix.patch
    	modified:   phatch.spec

 crash_fix.patch |   23 +++++++++++++++++++++++
 phatch.spec     |    9 +++++++--
 2 files changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/crash_fix.patch b/crash_fix.patch
new file mode 100644
index 0000000..78d7ef6
--- /dev/null
+++ b/crash_fix.patch
@@ -0,0 +1,23 @@
+diff -ur phatch-0.2.7_orig/phatch/core/api.py phatch-0.2.7/phatch/core/api.py
+--- phatch-0.2.7_orig/phatch/core/api.py	2010-03-12 12:29:26.000000000 +0530
++++ phatch-0.2.7/phatch/core/api.py	2011-05-12 23:27:20.398002673 +0530
+@@ -774,11 +774,17 @@
+     #open image and check for errors
+     photo, result = get_photo(image_info, info_not_file, result)
+     if result['abort']:
++      if(photo is None):
++        return 'return'
++      else:
+         photo.close()
+         return 'return'
+     elif not photo or result['skip']:
+-        photo.close()
+-        return 'continue'
++        if(photo is None):
++           return 'continue'
++        else:
++           photo.close()
++           return 'continue'
+     info = photo.info
+     info.set('imageindex', image_index)
+     image = photo.get_layer().image
diff --git a/phatch.spec b/phatch.spec
index bcb95b6..7f8723e 100644
--- a/phatch.spec
+++ b/phatch.spec
@@ -2,7 +2,7 @@
 %define debug_package %{nil}
 Name:           phatch
 Version:        0.2.7
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Photo batch processor
 Group:          Applications/Multimedia
 License:        GPLv3+
@@ -21,6 +21,8 @@ Requires:       hicolor-icon-theme
 Requires:       xdg-utils
 Requires:       wxPython
 Requires:       %{name}-cli = %{version}-%{release}
+Patch1 : crash_fix.patch
+
 
 %description
 Phatch is a simple to use cross-platform GUI Photo Batch Processor
@@ -67,7 +69,7 @@ rm -f docs/build/html/.buildinfo
 sed -i -e 's/\+ doc_files//' setup.py
 # Change search path for documentation
 sed -i -e "s at help_path =.*@help_path=\'%{_datadir}/doc/%{name}-%{version}\'@" %{name}/pyWx/gui.py
-
+%patch1 -p1 -b .orig
 
 %build
 %{__python} setup.py build
@@ -138,6 +140,9 @@ rm -rf $RPM_BUILD_ROOT
 %{python_sitelib}/%{name}/lib/linux/nautilusExtension.*
 
 %changelog
+* Thu May 12 2011 Lakshmi Narasimhan T V <lakshminaras2002 at gmail.com> - 0.2.7-4
+- Fix crash issue #646035
+
 * Sat Nov 20 2010 Nicoleau Fabien <nicoleau.fabien at gmail.com> - 0.2.7-3
 - Remove thai-scalable-purisa-fonts from requires
 * Wed Jul 21 2010 David Malcolm <dmalcolm at redhat.com> - 0.2.7-2


More information about the scm-commits mailing list