Author: toshok
Date: 2007-12-05 19:20:39 -0500 (Wed, 05 Dec 2007)
New Revision: 90784
Modified:
trunk/moon/src/namescope.cpp
Log:
make our FindName more resilient in the face of NULL lookups. Fixes crash in
sparkleball.
Modified: trunk/moon/src/namescope.cpp
===================================================================
--- trunk/moon/src/namescope.cpp 2007-12-05 23:16:49 UTC (rev 90783)
+++ trunk/moon/src/namescope.cpp 2007-12-06 00:20:39 UTC (rev 90784)
@@ -60,6 +60,11 @@
DependencyObject*
NameScope::FindName (const char *name)
{
+ if (name == NULL) {
+ g_warning ("NULL passed to FindName");
+ return NULL;
+ }
+
DependencyObject *o = (DependencyObject*)g_hash_table_lookup (names,
name);
if (o)
return o;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches