f-spot r4006 - trunk/src/Extensions



Author: sdelcroix
Date: Wed May 28 12:58:06 2008
New Revision: 4006
URL: http://svn.gnome.org/viewvc/f-spot?rev=4006&view=rev

Log:
nullity check

Modified:
   trunk/src/Extensions/PhotoSelectionCondition.cs

Modified: trunk/src/Extensions/PhotoSelectionCondition.cs
==============================================================================
--- trunk/src/Extensions/PhotoSelectionCondition.cs	(original)
+++ trunk/src/Extensions/PhotoSelectionCondition.cs	Wed May 28 12:58:06 2008
@@ -23,9 +23,8 @@
 	{
 		public PhotoSelectionCondition()
 		{
-			MainWindow.Toplevel.Selection.Changed += delegate {
-				NotifyChanged ();
-			};
+			if (MainWindow.Toplevel != null)
+				MainWindow.Toplevel.Selection.Changed += delegate { NotifyChanged ();};
 		}
 
 		public override bool Evaluate (NodeElement conditionNode)



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