Skip to content

Commit 77a876c

Browse files
authored
Merge pull request #48081 from bruvzg/fix_api_gen_crash
Fix crash on GDNative API json generator exit.
2 parents f6d5b2f + a4423c8 commit 77a876c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/gdnative/nativescript/nativescript.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
#include "core/os/file_access.h"
4242
#include "core/os/os.h"
4343

44+
#include "main/main.h"
45+
4446
#include "scene/main/scene_tree.h"
4547
#include "scene/resources/resource_format_text.h"
4648

@@ -1248,6 +1250,7 @@ void NativeScriptLanguage::init() {
12481250
if (generate_c_api(E->next()->get()) != OK) {
12491251
ERR_PRINT("Failed to generate C API\n");
12501252
}
1253+
Main::cleanup(true);
12511254
exit(0);
12521255
}
12531256

@@ -1257,6 +1260,7 @@ void NativeScriptLanguage::init() {
12571260
if (generate_c_builtin_api(E->next()->get()) != OK) {
12581261
ERR_PRINT("Failed to generate C builtin API\n");
12591262
}
1263+
Main::cleanup(true);
12601264
exit(0);
12611265
}
12621266
#endif

0 commit comments

Comments
 (0)