summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-04-22 09:46:43 +0200
committerGitHub <noreply@github.com>2021-04-22 09:46:43 +0200
commit77a876c6e1c9eb60abbd9ad6f6ba6d9bc0af14e1 (patch)
treeee0462d91392fa8e368bbf873dcf3ac5fa1c752b /modules
parentf6d5b2f3c242f08af835891caff32ed6342290a9 (diff)
parenta4423c82f87ad0eaa9ffc3842407d003321ac22d (diff)
Merge pull request #48081 from bruvzg/fix_api_gen_crash
Fix crash on GDNative API json generator exit.
Diffstat (limited to 'modules')
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index f795bef59f..3283f28de5 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -41,6 +41,8 @@
#include "core/os/file_access.h"
#include "core/os/os.h"
+#include "main/main.h"
+
#include "scene/main/scene_tree.h"
#include "scene/resources/resource_format_text.h"
@@ -1248,6 +1250,7 @@ void NativeScriptLanguage::init() {
if (generate_c_api(E->next()->get()) != OK) {
ERR_PRINT("Failed to generate C API\n");
}
+ Main::cleanup(true);
exit(0);
}
@@ -1257,6 +1260,7 @@ void NativeScriptLanguage::init() {
if (generate_c_builtin_api(E->next()->get()) != OK) {
ERR_PRINT("Failed to generate C builtin API\n");
}
+ Main::cleanup(true);
exit(0);
}
#endif