mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #102837 from raulsntos/dotnet/fix-reload-callables
[.NET] Skip serializing delegates with a disposed target
This commit is contained in:
commit
7e9b709917
2 changed files with 14 additions and 2 deletions
|
@ -685,8 +685,14 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) {
|
|||
|
||||
if (success) {
|
||||
ManagedCallable::instances_pending_reload.insert(managed_callable, serialized_data);
|
||||
} else if (OS::get_singleton()->is_stdout_verbose()) {
|
||||
OS::get_singleton()->print("Failed to serialize delegate\n");
|
||||
} else {
|
||||
if (OS::get_singleton()->is_stdout_verbose()) {
|
||||
OS::get_singleton()->print("Failed to serialize delegate.\n");
|
||||
}
|
||||
|
||||
// We failed to serialize the delegate but we still have to release it;
|
||||
// otherwise, we won't be able to unload the assembly.
|
||||
managed_callable->release_delegate_handle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue