From e63c7baf7ee875644f6b978f689b0f147dbf9307 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Fri, 5 Nov 2004 21:46:15 +0000 Subject: [PATCH] 2004-11-06 Zoltan Varga * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an exception instead of asserting if name is null. (ves_icall_System_AppDomain_GetData): Ditto. svn path=/trunk/mono/; revision=35746 --- mono/metadata/ChangeLog | 6 ++++++ mono/metadata/appdomain.c | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog index 04fea13abee..b12a9b0e3ae 100644 --- a/mono/metadata/ChangeLog +++ b/mono/metadata/ChangeLog @@ -1,3 +1,9 @@ +2004-11-06 Zoltan Varga + + * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an + exception instead of asserting if name is null. + (ves_icall_System_AppDomain_GetData): Ditto. + 2004-11-05 Zoltan Varga (ves_icall_get_enum_info): Avoid crash when called on a non-finished diff --git a/mono/metadata/appdomain.c b/mono/metadata/appdomain.c index 29a4ee915d7..e6f49a51881 100644 --- a/mono/metadata/appdomain.c +++ b/mono/metadata/appdomain.c @@ -286,7 +286,9 @@ ves_icall_System_AppDomain_GetData (MonoAppDomain *ad, MonoString *name) MONO_ARCH_SAVE_REGS; g_assert (ad != NULL); - g_assert (name != NULL); + + if (name == NULL) + mono_raise_exception (mono_get_exception_argument_null ("name")); str = mono_string_to_utf8 (name); @@ -330,7 +332,9 @@ ves_icall_System_AppDomain_SetData (MonoAppDomain *ad, MonoString *name, MonoObj MONO_ARCH_SAVE_REGS; g_assert (ad != NULL); - g_assert (name != NULL); + + if (name == NULL) + mono_raise_exception (mono_get_exception_argument_null ("name")); mono_domain_lock (add); -- 2.25.1