? patch.diff
? libeog/access.lo
? libeog/accessible-image-view-factory.lo
? libeog/accessible-image-view.lo
? libeog/cursors.lo
? libeog/eog-file-selection.lo
? libeog/eog-image.lo
? libeog/eog-pixbuf-util.lo
? libeog/eog-scroll-view.lo
? libeog/image-view.lo
? libeog/libeog-marshal.lo
? libeog/libfspoteog.la
? libeog/ui-image.lo
? libeog/uta.lo
? libeog/zoom.lo
? libfspot/f-image-view.lo
? libfspot/f-jpeg-utils.lo
? libfspot/f-marshal.lo
? libfspot/f-pixbuf-save.lo
? libfspot/f-pixbuf-unsharp.lo
? libfspot/f-pixbuf-utils.lo
? libfspot/f-screen-utils.lo
? libfspot/f-utils.lo
? libfspot/libfspot.la
? libjpegtran/jpeg-data.lo
? libjpegtran/jpeg-marker.lo
? libjpegtran/jpegtran.lo
? libjpegtran/libfspotjpegtran.la
? libjpegtran/transupp.lo
? po/.intltool-merge-cache
? po/stamp-it
? src/JpegFile.cs.BT
Index: src/JpegFile.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/JpegFile.cs,v
retrieving revision 1.41
diff -u -p -r1.41 JpegFile.cs
--- src/JpegFile.cs	19 Sep 2006 20:50:37 -0000	1.41
+++ src/JpegFile.cs	21 Sep 2006 05:16:52 -0000
@@ -66,6 +66,9 @@ namespace FSpot {
 		public override string Description {
 			get {
 #if USE_TIFF
+				if (ExifHeader == null)
+					return null;
+					
 				try {
 					SubdirectoryEntry sub = (SubdirectoryEntry) ExifHeader.Directory.Lookup (TagId.ExifIfdPointer);
 					if (sub != null) {
@@ -228,7 +231,7 @@ namespace FSpot {
 				if (exif_data == null) {
 					exif_data = Header.Exif;
 
-					if (exif_data.Handle.Handle == System.IntPtr.Zero)
+					if ( (exif_data == null) || (exif_data.Handle.Handle == System.IntPtr.Zero) )
 						exif_data = new Exif.ExifData ();
 				}
 				System.Console.WriteLine ("loading exif data");
@@ -286,6 +289,9 @@ namespace FSpot {
 				System.DateTime time;
 				try {
 #if USE_TIFF
+					if (ExifHeader == null)
+						return base.Date;
+						
 					SubdirectoryEntry sub = (SubdirectoryEntry) ExifHeader.Directory.Lookup (TagId.ExifIfdPointer);
 					DirectoryEntry e;
 					
Index: src/JpegHeader.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/JpegHeader.cs,v
retrieving revision 1.25
diff -u -p -r1.25 JpegHeader.cs
--- src/JpegHeader.cs	12 Sep 2006 04:39:31 -0000	1.25
+++ src/JpegHeader.cs	21 Sep 2006 05:16:53 -0000
@@ -422,11 +422,15 @@ public class JpegHeader : SemWeb.Stateme
 	public void Save (System.IO.Stream stream)
 	{
 		foreach (Marker marker in marker_list) {
+
 			//System.Console.WriteLine ("saving marker {0} {1}", marker.Type, 
 			//			   (marker.Data != null) ? marker.Data.Length .ToString (): "(null)");
-			marker.Save (stream);
-			if (marker.Type == JpegMarker.Sos)
-				stream.Write (ImageData, 0, ImageData.Length);
+			
+			if (marker.Type > 0) { // to ensure we have a valid marker.
+				marker.Save (stream);
+				if (marker.Type == JpegMarker.Sos)
+					stream.Write (ImageData, 0, ImageData.Length);
+			}
 		}
 	}
 
