Fixes [#44729](https://bugzilla.xamarin.com/show_bug.cgi?id=44729).
if (type == NULL){
if (throwOnError) {
- mono_error_set_type_load_name (&error, g_strdup (str), NULL, "");
+ mono_error_set_type_load_name (&error, g_strdup (str), g_strdup (""), "");
goto leave;
}
}
}
exception = mono_exception_from_name_two_strings_checked (mono_get_corlib (), "System", "TypeLoadException", type_name, assembly_name, error_out);
- if (exception)
+ if (exception && error->full_message != NULL && strcmp (error->full_message, ""))
set_message_on_exception (exception, error, error_out);
} else {
exception = mono_exception_from_name_msg (mono_defaults.corlib, "System", "TypeLoadException", error->full_message);