Index: libeog/eog-image.c
===================================================================
RCS file: /cvs/gnome/eog/libeog/eog-image.c,v
retrieving revision 1.78
diff -u -p -r1.78 eog-image.c
--- libeog/eog-image.c	22 Dec 2006 16:26:00 -0000	1.78
+++ libeog/eog-image.c	28 Dec 2006 08:24:16 -0000
@@ -1790,10 +1790,10 @@ eog_image_get_exif_orientation (EogImage
 	  
 #ifdef HAVE_EXIF
 	if (priv->exif != NULL) {
+		ExifByteOrder o = exif_data_get_byte_order (priv->exif);
 		ExifEntry *e = exif_data_get_entry (priv->exif, EXIF_TAG_ORIENTATION);
 
 		if (e != NULL && e->data != NULL) {
-			ExifByteOrder o = exif_data_get_byte_order (e->parent->parent);
 			orientation = exif_get_short (e->data, o);
 		}
 	}
