From 206544cbc0e8b98de056eb6aeff65bd97a6b67d4 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 6 May 2025 14:47:50 +0200 Subject: [PATCH] fix: crash on macOS dialog after `window-all-closed` (#46927) fix: crash on dialog after window-all-closed --- shell/browser/ui/cocoa/electron_ns_window.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/browser/ui/cocoa/electron_ns_window.mm b/shell/browser/ui/cocoa/electron_ns_window.mm index f1435d0fc7f5..cf9d479b93fc 100644 --- a/shell/browser/ui/cocoa/electron_ns_window.mm +++ b/shell/browser/ui/cocoa/electron_ns_window.mm @@ -218,7 +218,7 @@ void SwizzleSwipeWithEvent(NSView* view, SEL swiz_selector) { } - (NSRect)contentRectForFrameRect:(NSRect)frameRect { - if (shell_->has_frame()) + if (shell_ && shell_->has_frame()) return [super contentRectForFrameRect:frameRect]; else return frameRect;