File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ - (void)applicationWillTerminate:(NSNotification *)notification {
240240
241241- (NSApplicationTerminateReply )applicationShouldTerminate : (NSApplication *)sender {
242242 DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton ();
243- if (ds) {
243+ if (ds && ds-> has_window (DisplayServerMacOS::MAIN_WINDOW_ID) ) {
244244 ds->send_window_event (ds->get_window (DisplayServerMacOS::MAIN_WINDOW_ID), DisplayServerMacOS::WINDOW_EVENT_CLOSE_REQUEST);
245245 }
246246 OS_MacOS *os = (OS_MacOS *)OS::get_singleton ();
Original file line number Diff line number Diff line change 882882void OS_MacOS::cleanup () {
883883 if (main_loop) {
884884 main_loop->finalize ();
885- @autoreleasepool {
886- Main::cleanup ();
887- }
885+ }
886+ @autoreleasepool {
887+ Main::cleanup ();
888888 }
889889}
890890
You can’t perform that action at this time.
0 commit comments