eog r4707 - in trunk: . src
- From: friemann svn gnome org
- To: svn-commits-list gnome org
- Subject: eog r4707 - in trunk: . src
- Date: Wed, 27 Aug 2008 14:51:10 +0000 (UTC)
Author: friemann
Date: Wed Aug 27 14:51:10 2008
New Revision: 4707
URL: http://svn.gnome.org/viewvc/eog?rev=4707&view=rev
Log:
2008-08-27 Felix Riemann <friemann svn gnome org>
* src/eog-image.c: (eog_image_real_load): Don't assert if pixbuf
loaders don't report errors correctly. Return a generic error message.
Modified:
trunk/ChangeLog
trunk/src/eog-image.c
Modified: trunk/src/eog-image.c
==============================================================================
--- trunk/src/eog-image.c (original)
+++ trunk/src/eog-image.c Wed Aug 27 14:51:10 2008
@@ -1015,16 +1015,14 @@
} else {
priv->status = EOG_IMAGE_STATUS_FAILED;
}
- } else {
- if (read_image_data) {
- if (priv->image != NULL) {
- g_object_unref (priv->image);
- }
-
- priv->image = gdk_pixbuf_loader_get_pixbuf (loader);
+ } else if (read_image_data) {
+ if (priv->image != NULL) {
+ g_object_unref (priv->image);
+ }
- g_assert (priv->image != NULL);
+ priv->image = gdk_pixbuf_loader_get_pixbuf (loader);
+ if (G_LIKELY (priv->image != NULL)) {
g_object_ref (priv->image);
priv->width = gdk_pixbuf_get_width (priv->image);
@@ -1044,6 +1042,11 @@
0,
priv->width,
priv->height);
+ } else {
+ /* Some loaders don't report errors correctly.
+ * Error will be set below. */
+ failed = TRUE;
+ priv->status = EOG_IMAGE_STATUS_FAILED;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]