gnome-desktop r5320 - trunk/libgnome-desktop



Author: vuntz
Date: Fri Dec  5 02:48:22 2008
New Revision: 5320
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5320&view=rev

Log:
2008-12-05  Vincent Untz  <vuntz gnome org>

	* gnome-bg.c: (get_current_slide): add assertion
	(read_slideshow_file): if there are no slides in the slideshow, do as
	if there were no slideshow at all.
	Should fix bug #522756.


Modified:
   trunk/libgnome-desktop/ChangeLog
   trunk/libgnome-desktop/gnome-bg.c

Modified: trunk/libgnome-desktop/gnome-bg.c
==============================================================================
--- trunk/libgnome-desktop/gnome-bg.c	(original)
+++ trunk/libgnome-desktop/gnome-bg.c	Fri Dec  5 02:48:22 2008
@@ -1147,6 +1147,11 @@
 		elapsed += slide->duration;
 	}
 
+	/* this should never happen since we have slides and we should always
+	 * find a current slide for the elapsed time since beginning -- we're
+	 * looping with fmod() */
+	g_assert_not_reached ();
+
 	return NULL;
 }
 
@@ -2251,6 +2256,12 @@
 		show->start_time = (double)t;
 			
 		dump_bg (show);
+
+		/* no slides, that's not a slideshow */
+		if (g_queue_get_length (show->slides) == 0) {
+			slideshow_unref (show);
+			show = NULL;
+		}
 	}
 
 	g_free (contents);



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