[macOS] Fix cleanup with some command line tools.
This commit is contained in:
parent
1ba856565d
commit
698ff2a192
2 changed files with 4 additions and 4 deletions
|
|
@ -240,7 +240,7 @@
|
|||
|
||||
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
|
||||
DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
|
||||
if (ds) {
|
||||
if (ds && ds->has_window(DisplayServerMacOS::MAIN_WINDOW_ID)) {
|
||||
ds->send_window_event(ds->get_window(DisplayServerMacOS::MAIN_WINDOW_ID), DisplayServerMacOS::WINDOW_EVENT_CLOSE_REQUEST);
|
||||
}
|
||||
OS_MacOS *os = (OS_MacOS *)OS::get_singleton();
|
||||
|
|
|
|||
|
|
@ -882,9 +882,9 @@ void OS_MacOS::terminate() {
|
|||
void OS_MacOS::cleanup() {
|
||||
if (main_loop) {
|
||||
main_loop->finalize();
|
||||
@autoreleasepool {
|
||||
Main::cleanup();
|
||||
}
|
||||
}
|
||||
@autoreleasepool {
|
||||
Main::cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue