Skip to content

Commit 22a4f79

Browse files
sbuggayfacebook-github-bot
authored andcommitted
Fix LogBox dealloc crashing Mac Catalyst (#53259)
Summary: Pull Request resolved: #53259 delegate.window is not supported in Mac Catalyst, causing a crash in various scenarios such as Metro refresh. Changelog: [Internal] Reviewed By: shwanton Differential Revision: D80189486 fbshipit-source-id: d0e8156f8f95769c114b497f53731876478fb1f4
1 parent 94d260e commit 22a4f79

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/react-native/React/CoreModules/RCTLogBoxView.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ - (void)layoutSubviews
8181

8282
- (void)dealloc
8383
{
84+
#if !TARGET_OS_MACCATALYST // sharedApplication.delegate is not available on Mac Catalyst
8485
[RCTSharedApplication().delegate.window makeKeyWindow];
86+
#endif
8587
}
8688

8789
- (void)show

0 commit comments

Comments
 (0)