Merge pull request #48081 from bruvzg/fix_api_gen_crash
Fix crash on GDNative API json generator exit.
This commit is contained in:
commit
77a876c6e1
|
@ -41,6 +41,8 @@
|
||||||
#include "core/os/file_access.h"
|
#include "core/os/file_access.h"
|
||||||
#include "core/os/os.h"
|
#include "core/os/os.h"
|
||||||
|
|
||||||
|
#include "main/main.h"
|
||||||
|
|
||||||
#include "scene/main/scene_tree.h"
|
#include "scene/main/scene_tree.h"
|
||||||
#include "scene/resources/resource_format_text.h"
|
#include "scene/resources/resource_format_text.h"
|
||||||
|
|
||||||
|
@ -1248,6 +1250,7 @@ void NativeScriptLanguage::init() {
|
||||||
if (generate_c_api(E->next()->get()) != OK) {
|
if (generate_c_api(E->next()->get()) != OK) {
|
||||||
ERR_PRINT("Failed to generate C API\n");
|
ERR_PRINT("Failed to generate C API\n");
|
||||||
}
|
}
|
||||||
|
Main::cleanup(true);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1257,6 +1260,7 @@ void NativeScriptLanguage::init() {
|
||||||
if (generate_c_builtin_api(E->next()->get()) != OK) {
|
if (generate_c_builtin_api(E->next()->get()) != OK) {
|
||||||
ERR_PRINT("Failed to generate C builtin API\n");
|
ERR_PRINT("Failed to generate C builtin API\n");
|
||||||
}
|
}
|
||||||
|
Main::cleanup(true);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue