Fix crash on GDNative API json generator exit.

This commit is contained in:
bruvzg 2021-04-22 10:24:04 +03:00
parent f6d5b2f3c2
commit a4423c82f8
No known key found for this signature in database
GPG Key ID: 009E1BFE42239B95

View File

@ -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