Author: rolf
Date: 2007-06-18 12:38:35 -0400 (Mon, 18 Jun 2007)
New Revision: 80019

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/runtime.cpp
Log:
2007-06-18  Rolf Bjarne Kvinge  <[EMAIL PROTECTED]>

        * runtime.cpp: Changed DependencyObject::SetValue to never store 
        a null value in the hashtable.



Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-06-18 16:15:48 UTC (rev 80018)
+++ trunk/moon/src/ChangeLog    2007-06-18 16:38:35 UTC (rev 80019)
@@ -1,3 +1,8 @@
+2007-06-18  Rolf Bjarne Kvinge  <[EMAIL PROTECTED]>
+
+       * runtime.cpp: Changed DependencyObject::SetValue to never store 
+       a null value in the hashtable.
+
 2007-06-18  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * brush.cpp: Refactor the pattern creation to allow caching.

Modified: trunk/moon/src/runtime.cpp
===================================================================
--- trunk/moon/src/runtime.cpp  2007-06-18 16:15:48 UTC (rev 80018)
+++ trunk/moon/src/runtime.cpp  2007-06-18 16:38:35 UTC (rev 80019)
@@ -1842,7 +1842,16 @@
                                dob->Detach (property, this);
                }
 
-               Value *store = value ? new Value (*value) : NULL;
+               //
+               // Don't store a null value, since GetValue will then 
+               // return the default value.
+               //
+               Value *store;
+               if (value == NULL) {
+                       store = new Value (property->value_type, true);
+               } else {
+                       store = new Value (*value);
+               }
 
                g_hash_table_insert (current_values, property->name, store);
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to