The function gimp-drawable-type-with-alpha wasn't completely guarded. Calling it with a non-existent drawable would cause a crash. --- gimp-cvs-2601-2000/app/gimpdrawable.c Mon Jan 31 22:57:32 2000 +++ gimp-patches/app/gimpdrawable.c Mon Jan 31 22:57:54 2000 @@ -277,9 +277,13 @@ GimpImageType gimp_drawable_type_with_alpha (GimpDrawable *drawable) { - GimpImageType type = gimp_drawable_type (drawable); + GimpImageType type; + gboolean has_alpha; - gboolean has_alpha = gimp_drawable_has_alpha (drawable); + type = gimp_drawable_type (drawable); + if (type == -1) + return 0; + has_alpha = gimp_drawable_has_alpha (drawable); if (has_alpha) return type;