gimp r27181 - in trunk: . plug-ins/file-psd



Author: martinn
Date: Wed Oct  8 19:59:36 2008
New Revision: 27181
URL: http://svn.gnome.org/viewvc/gimp?rev=27181&view=rev

Log:
Bug 555587 â PSD file crashes PSD plug-in

* plug-ins/file-psd/psd-load.c (add_merged_image): Handle
img_a->alpha_names being NULL.


Modified:
   trunk/ChangeLog
   trunk/plug-ins/file-psd/psd-load.c

Modified: trunk/plug-ins/file-psd/psd-load.c
==============================================================================
--- trunk/plug-ins/file-psd/psd-load.c	(original)
+++ trunk/plug-ins/file-psd/psd-load.c	Wed Oct  8 19:59:36 2008
@@ -1557,10 +1557,14 @@
       if (img_a->transparency)
         {
           offset = 1;
+
           /* Free "Transparency" channel name */
-          alpha_name = g_ptr_array_index (img_a->alpha_names, 0);
-          if (alpha_name)
-            g_free (alpha_name);
+          if (img_a->alpha_names)
+            {
+              alpha_name = g_ptr_array_index (img_a->alpha_names, 0);
+              if (alpha_name)
+                g_free (alpha_name);
+            }
         }
       else
         offset = 0;



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