summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2020-09-04 01:03:57 +0200
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2020-09-04 01:08:44 +0200
commit136181bb50c3273d6f2c2e294a95ed54087891f8 (patch)
treed082e9f2fd45530dc6d0b1e4092c932f30282b17
parentfd51d022c13ddf101b0e5f296c0ffb9e14699847 (diff)
Fix 'Parameter "assembly" is null' error
This error was normally being printed when trying to open the project assembly while the project was not yet built. The error should not be printed. It's the job of this method's caller to decide whether to print an error or not if loading failed.
-rw-r--r--modules/mono/mono_gd/gd_mono_assembly.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/mono/mono_gd/gd_mono_assembly.cpp b/modules/mono/mono_gd/gd_mono_assembly.cpp
index 9dbeee57ce..6d7b771fd3 100644
--- a/modules/mono/mono_gd/gd_mono_assembly.cpp
+++ b/modules/mono/mono_gd/gd_mono_assembly.cpp
@@ -464,7 +464,9 @@ GDMonoAssembly *GDMonoAssembly::load(const String &p_name, MonoAssemblyName *p_a
if (!assembly) {
assembly = _load_assembly_search(p_name, p_aname, p_refonly, p_search_dirs);
- ERR_FAIL_NULL_V(assembly, nullptr);
+ if (!assembly) {
+ return nullptr;
+ }
}
GDMonoAssembly *loaded_asm = GDMono::get_singleton()->get_loaded_assembly(p_name);
@@ -487,7 +489,9 @@ GDMonoAssembly *GDMonoAssembly::load_from(const String &p_name, const String &p_
if (!assembly) {
assembly = _real_load_assembly_from(p_path, p_refonly);
- ERR_FAIL_NULL_V(assembly, nullptr);
+ if (!assembly) {
+ return nullptr;
+ }
}
GDMonoAssembly *loaded_asm = GDMono::get_singleton()->get_loaded_assembly(p_name);