Skip to content

Commit

Permalink
Fix crash on GDNative API json generator exit.
Browse files Browse the repository at this point in the history
  • Loading branch information
bruvzg committed Apr 22, 2021
1 parent f6d5b2f commit a4423c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/gdnative/nativescript/nativescript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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);
}

Expand All @@ -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
Expand Down

0 comments on commit a4423c8

Please sign in to comment.