From ef98d4d66a327554b9ffa54e36a26166bc2b14cf Mon Sep 17 00:00:00 2001 From: Noah Martin Date: Mon, 3 Nov 2025 15:42:35 -0500 Subject: [PATCH] fix: Crash when user feedback block is nil --- CHANGELOG.md | 1 + Sources/Sentry/SentryOptions.m | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edf1dd0536f..1051d593757 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ - Fixes warnings about minimum OS version being lower than Xcode supported version (#5591) - Fix rendering method for fast view rendering (#6360) +- Fixes a crash when setting configureUserFeedback to nil (#6642) - Fix issue where the thread that generated an event could be missing when more than 100 threads are running (#6377) - Fix wrong Frame Delay when becoming active, which lead to false reported app hangs when the app moves to the foreground after being in the background (#6381) - Session Replay masking improvements (#6292) diff --git a/Sources/Sentry/SentryOptions.m b/Sources/Sentry/SentryOptions.m index 3cc73ae9a27..40ce11c5b9a 100644 --- a/Sources/Sentry/SentryOptions.m +++ b/Sources/Sentry/SentryOptions.m @@ -395,7 +395,9 @@ - (void)setConfigureUserFeedback:(SentryUserFeedbackConfigurationBlock)configure SentryUserFeedbackConfiguration *userFeedbackConfiguration = [[SentryUserFeedbackConfiguration alloc] init]; self.userFeedbackConfiguration = userFeedbackConfiguration; - configureUserFeedback(userFeedbackConfiguration); + if (configureUserFeedback) { + configureUserFeedback(userFeedbackConfiguration); + } } #endif // TARGET_OS_IOS && SENTRY_HAS_UIKIT