Fix assertion when opening .gz files with an old GIO
authorBastien Nocera <hadess@hadess.net>
Thu, 4 Mar 2010 16:21:36 +0000 (16:21 +0000)
committerStephane Delcroix <stephane_delcroix@mckinsey.com>
Fri, 5 Mar 2010 12:35:55 +0000 (13:35 +0100)
We should simply error out instead.

io-xcf.c

index cb480e9..7a19b88 100644 (file)
--- a/io-xcf.c
+++ b/io-xcf.c
@@ -1462,7 +1462,12 @@ xcf_image_stop_load (gpointer data, GError **error)
                else
                        g_object_unref (pixbuf);
        } else {
-               g_assert_not_reached ();
+               retval = FALSE;
+               g_set_error (error,
+                            G_FILE_ERROR,
+                            GDK_PIXBUF_ERROR_UNKNOWN_TYPE,
+                            "Gzip XCF support is disabled");
+               goto bail;
        }
 
 done: