fix: crash on macOS dialog after window-all-closed (#46953)

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 <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot] 2025-05-06 14:11:49 -05:00 committed by GitHub
parent 00d6963afd
commit 0630744f5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -221,7 +221,7 @@ void SwizzleSwipeWithEvent(NSView* view, SEL swiz_selector) {
} }
- (NSRect)contentRectForFrameRect:(NSRect)frameRect { - (NSRect)contentRectForFrameRect:(NSRect)frameRect {
if (shell_->has_frame()) if (shell_ && shell_->has_frame())
return [super contentRectForFrameRect:frameRect]; return [super contentRectForFrameRect:frameRect];
else else
return frameRect; return frameRect;