nautilus r13658 - in trunk: . libnautilus-private



Author: alexl
Date: Mon Jan 28 10:58:06 2008
New Revision: 13658
URL: http://svn.gnome.org/viewvc/nautilus?rev=13658&view=rev

Log:
2008-01-28  Alexander Larsson  <alexl redhat com>

        * libnautilus-private/nautilus-directory-async.c:
        (thumbnail_done):
	Don't reference thumb_mtime_str if its not
	set, fixing a crash on zoom in. (#511406)
	Patch from John Millikin



Modified:
   trunk/ChangeLog
   trunk/libnautilus-private/nautilus-directory-async.c

Modified: trunk/libnautilus-private/nautilus-directory-async.c
==============================================================================
--- trunk/libnautilus-private/nautilus-directory-async.c	(original)
+++ trunk/libnautilus-private/nautilus-directory-async.c	Mon Jan 28 10:58:06 2008
@@ -3650,7 +3650,7 @@
 		gboolean tried_original)
 {
 	const char *thumb_mtime_str;
-	time_t thumb_mtime;
+	time_t thumb_mtime = 0;
 	
 	file->details->thumbnail_is_up_to_date = TRUE;
 	file->details->thumbnail_tried_original  = tried_original;
@@ -3661,8 +3661,10 @@
 	file->details->thumbnail_size = 0;
 	if (pixbuf) {
 		thumb_mtime_str = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::MTime");
-		thumb_mtime = atol (thumb_mtime_str);
-
+		if (thumb_mtime_str) {
+			thumb_mtime = atol (thumb_mtime_str);
+		}
+		
 		if (thumb_mtime == 0 ||
 		    thumb_mtime == file->details->mtime) {
 			file->details->thumbnail = g_object_ref (pixbuf);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]