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;