Avoid trying to load non-existent assembly
If the project assembly does not exist, return `false` directly instead of trying to load it. This prevents the `System.InvalidOperationException` thrown for failing to locate managed application.
This commit is contained in:
parent
8a1e598011
commit
c56b157c61
1 changed files with 4 additions and 0 deletions
|
|
@ -517,6 +517,10 @@ bool GDMono::_load_project_assembly() {
|
|||
.plus_file(assembly_name + ".dll");
|
||||
assembly_path = ProjectSettings::get_singleton()->globalize_path(assembly_path);
|
||||
|
||||
if (!FileAccess::exists(assembly_path)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
String loaded_assembly_path;
|
||||
bool success = plugin_callbacks.LoadProjectAssemblyCallback(assembly_path.utf16(), &loaded_assembly_path);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue