f-spot r4041 - in trunk: . src/Widgets



Author: rubenv
Date: Wed Jun  4 17:47:26 2008
New Revision: 4041
URL: http://svn.gnome.org/viewvc/f-spot?rev=4041&view=rev

Log:
2008-06-04  Ruben Vermeersch  <ruben savanne be>

	* src/Widgets/Sidebar.cs: Prevent a crasher caused by the preference
	loading. Because the information panel no longer exists, an invalid panel
	was chosen.


Modified:
   trunk/ChangeLog
   trunk/src/Widgets/Sidebar.cs

Modified: trunk/src/Widgets/Sidebar.cs
==============================================================================
--- trunk/src/Widgets/Sidebar.cs	(original)
+++ trunk/src/Widgets/Sidebar.cs	Wed Jun  4 17:47:26 2008
@@ -100,6 +100,10 @@
 		
 		public void SwitchTo (int n)
 		{
+            if (n >= notebook.Children.Length) {
+                n = 0;
+            }
+
 			if (n != notebook.CurrentPage)
 			{				
 				notebook.CurrentPage = n;



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