Index: psd.c
===================================================================
RCS file: /cvs/gnome/gimp/plug-ins/common/psd.c,v
retrieving revision 1.51
diff -u -p -r1.51 psd.c
--- psd.c	12 Dec 2003 15:49:49 -0000	1.51
+++ psd.c	1 Jan 2004 08:44:42 -0000
@@ -35,6 +35,9 @@
 /*
  * Revision history:
  *
+ *  2004-1-1 / v3.0.11 / Daniel Rogers <dsrogers@phaseveloctiy.org>
+ *       GIMP crashes on 0x0 layers, so we skip them.
+ *       
  *  2003-11-27 / v3.0.10 / Adam D. Moss
  *       GIMP 1.3/2.0 needs its layer/channel names to be UTF8 or it
  *       fails wackily, so convert the strings from the PSD file to
@@ -988,7 +991,7 @@ do_layer_record(FILE *fd, guint32 *offse
 
   if (strncmp(sig, "8BIM", 4)!=0)
     {
-      g_message ("Error: layer blend signature is incorrect. :-(");
+      g_message ("Error: layer blend signature \"%s\" is incorrect. :-(", sig);
       gimp_quit();
     }
 
@@ -1774,9 +1777,24 @@ load_image (const gchar *name)
 	  gint numc;
 	  guchar* merged_data = NULL;
 	  PSDlayer *layer = psd_image.layer + lnum;
-
+	  
+	  /*
+	   * since ps supports sloppy bounding boxes it is possible to
+	   * have a 0x0 or Xx0 or 0xY layer.  Gimp doesn't support a
+	   * 0x0 layer so we will just skip these.  We might be able
+	   * to do something better here.  Adam Moss suggested
+	   * creating a 1x1 layer totally transparent layer instead,
+	   * but I think it is better to just skip them until the gimp
+	   * supports the concept that enabled the creation of 0x0
+	   * layers (sloppy bounding boxes).  gimp-1.2 just skipped
+	   * them.
+	   */
+	  if ( ((layer->width) * (layer->height)) == 0)
+	    {
+	      continue;
+	    }
 	  numc = layer->num_channels;
-
+	  
 	  IFDBG printf("Hey, it's a LAYER with %d channels!\n", numc);
 
 	  switch (gimagetype)
