From 5cc343bcaea8de3ca316425fbdd7c466925d0f6e Mon Sep 17 00:00:00 2001 From: Jacopo Gasparetto Date: Thu, 27 Oct 2022 14:16:43 +0200 Subject: [PATCH] Hotfix: calling get_tree() caused crash on quit see https://github.com/godotengine/godot/issues/48295#issuecomment-981404421 --- CoreGame/CoreGame/src/GodotLibrary.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CoreGame/CoreGame/src/GodotLibrary.cpp b/CoreGame/CoreGame/src/GodotLibrary.cpp index 6a88a2f..c4312fa 100644 --- a/CoreGame/CoreGame/src/GodotLibrary.cpp +++ b/CoreGame/CoreGame/src/GodotLibrary.cpp @@ -14,6 +14,8 @@ using namespace godot; extern "C" void GDN_EXPORT godot_gdnative_init(godot_gdnative_init_options *o) { Godot::gdnative_init(o); } extern "C" void GDN_EXPORT godot_gdnative_terminate(godot_gdnative_terminate_options *o) { + // Crash on quit calling get_tree() https://github.com/godotengine/godot/issues/48295#issuecomment-981404421 + Godot::nativescript_terminate(godot::_RegisterState::nativescript_handle); Godot::gdnative_terminate(o); }