Skip to content

Commit 3687518

Browse files
authored
fix: Crash when user feedback block is nil
1 parent 17a26bf commit 3687518

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/Sentry/SentryOptions.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,9 @@ - (void)setConfigureUserFeedback:(SentryUserFeedbackConfigurationBlock)configure
395395
SentryUserFeedbackConfiguration *userFeedbackConfiguration =
396396
[[SentryUserFeedbackConfiguration alloc] init];
397397
self.userFeedbackConfiguration = userFeedbackConfiguration;
398-
configureUserFeedback(userFeedbackConfiguration);
398+
if (userFeedbackConfiguration) {
399+
configureUserFeedback(userFeedbackConfiguration);
400+
}
399401
}
400402
#endif // TARGET_OS_IOS && SENTRY_HAS_UIKIT
401403

0 commit comments

Comments
 (0)