[mapguide-commits] r5717 - trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Apr 21 11:18:07 EDT 2011


Author: jng
Date: 2011-04-21 08:18:07 -0700 (Thu, 21 Apr 2011)
New Revision: 5717

Modified:
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/MapDefinition.cs
Log:
Fix a broken unit test


Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/MapDefinition.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/MapDefinition.cs	2011-04-21 15:10:07 UTC (rev 5716)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/MapDefinition.cs	2011-04-21 15:18:07 UTC (rev 5717)
@@ -54,11 +54,14 @@
         protected void DetachChangeListeners()
         {
             var handler = this.PropertyChanged;
-            foreach (var h in handler.GetInvocationList())
+            if (handler != null)
             {
-                this.PropertyChanged -= (PropertyChangedEventHandler)h;
+                foreach (var h in handler.GetInvocationList())
+                {
+                    this.PropertyChanged -= (PropertyChangedEventHandler)h;
+                }
+                handler = null;
             }
-            handler = null;
         }
     }
 



More information about the mapguide-commits mailing list