From fdc322c93f63de1f556509de9588775a82fb8a9f Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 14:11:37 -0500 Subject: [PATCH] fix: crash on macOS dialog after `window-all-closed` (#46951) fix: crash on dialog after window-all-closed Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr --- 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 6555f47f5bc3..fabd68cd7f1f 100644 --- a/shell/browser/ui/cocoa/electron_ns_window.mm +++ b/shell/browser/ui/cocoa/electron_ns_window.mm @@ -221,7 +221,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;