Merge pull request #104615 from bruvzg/cleanup_fix

[macOS] Fix cleanup with some command line tools.
This commit is contained in:
Rémi Verschelde 2025-03-25 23:08:23 +01:00
commit 594d64ec24
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 4 additions and 4 deletions

View File

@ -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();

View File

@ -882,9 +882,9 @@ void OS_MacOS::terminate() {
void OS_MacOS::cleanup() {
if (main_loop) {
main_loop->finalize();
@autoreleasepool {
Main::cleanup();
}
}
@autoreleasepool {
Main::cleanup();
}
}