Author: jackson
Date: 2008-02-19 12:10:22 -0500 (Tue, 19 Feb 2008)
New Revision: 96167
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/xaml.cpp
Log:
* xaml.cpp: Parser error if we can't find the owner type or
property name when setting properties.
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2008-02-19 17:06:32 UTC (rev 96166)
+++ trunk/moon/src/ChangeLog 2008-02-19 17:10:22 UTC (rev 96167)
@@ -1,7 +1,7 @@
2008-02-19 Jackson Harper <[EMAIL PROTECTED]>
- * xaml.cpp: Parser error if we can't find the owner type when
- setting properties.
+ * xaml.cpp: Parser error if we can't find the owner type or
+ property name when setting properties.
2008-02-19 Sebastien Pouliot <[EMAIL PROTECTED]>
Modified: trunk/moon/src/xaml.cpp
===================================================================
--- trunk/moon/src/xaml.cpp 2008-02-19 17:06:32 UTC (rev 96166)
+++ trunk/moon/src/xaml.cpp 2008-02-19 17:10:22 UTC (rev 96167)
@@ -2763,16 +2763,18 @@
if (!owner) {
g_strfreev (prop_name);
- parser_error (p, parent->element_name, NULL, 2007,
g_strdup_printf ("Unknown element: %s.", parent->element_name));
- return;
+ return parser_error (p, parent->element_name, NULL,
2007, g_strdup_printf ("Unknown element: %s.", parent->element_name));
}
DependencyProperty *dep =
DependencyObject::GetDependencyProperty (owner->type, prop_name [1]);
g_strfreev (prop_name);
+ if (!dep)
+ return parser_error (p, parent->element_name, NULL,
2007, g_strdup_printf ("Unknown element: %s.", parent->element_name));
+
// Don't add the child element, if it is the entire collection
- if (!dep || dep->value_type == child->info->dependency_type)
+ if (dep->value_type == child->info->dependency_type)
return;
Type *col_type = Type::Find (dep->value_type);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches