Index: libeog/eog-image.c
===================================================================
RCS file: /cvs/gnome/eog/libeog/eog-image.c,v
retrieving revision 1.57
diff -u -r1.57 eog-image.c
--- libeog/eog-image.c	23 Aug 2005 20:14:57 -0000	1.57
+++ libeog/eog-image.c	6 Sep 2005 18:54:27 -0000
@@ -816,33 +816,38 @@
 		}
 
 		priv->image = gdk_pixbuf_loader_get_pixbuf (loader);
-		g_assert (priv->image != NULL);
-		g_object_ref (priv->image);		
-		priv->width = gdk_pixbuf_get_width (priv->image);
-		priv->height = gdk_pixbuf_get_height (priv->image);
+		if (priv->image == NULL) {
+			failed = TRUE;
+			priv->status = EOG_IMAGE_STATUS_FAILED;
+		}
+		else {
+			g_object_ref (priv->image);		
+			priv->width = gdk_pixbuf_get_width (priv->image);
+			priv->height = gdk_pixbuf_get_height (priv->image);
 
-		/* update meta data */
-		if (md_reader != NULL) {
+			/* update meta data */
+			if (md_reader != NULL) {
 #if HAVE_EXIF  
-			priv->exif = eog_metadata_reader_get_exif_data (md_reader);
-			priv->exif_chunk = NULL;
-			priv->exif_chunk_len = 0;
-			update_exif_data (img);
+				priv->exif = eog_metadata_reader_get_exif_data (md_reader);
+				priv->exif_chunk = NULL;
+				priv->exif_chunk_len = 0;
+				update_exif_data (img);
 #else
-			eog_metadata_reader_get_exif_chunk (md_reader, &priv->exif_chunk, &priv->exif_chunk_len);
+				eog_metadata_reader_get_exif_chunk (md_reader, &priv->exif_chunk, &priv->exif_chunk_len);
 #endif
-		}
+			}
 
-		/* update file format */
-		format = gdk_pixbuf_loader_get_format (loader);
-		if (format != NULL) {
-			priv->file_type = gdk_pixbuf_format_get_name (format);
-		}
+			/* update file format */
+			format = gdk_pixbuf_loader_get_format (loader);
+			if (format != NULL) {
+				priv->file_type = gdk_pixbuf_format_get_name (format);
+			}
 #if HAVE_LCMS
-		if (md_reader != NULL) {
-			extract_profile (img, md_reader);
-		}
+			if (md_reader != NULL) {
+				extract_profile (img, md_reader);
+			}
 #endif
+		}
 	}
 	/* clean up */
 	g_object_unref (loader);
