Skip to content

Commit 76950aa

Browse files
authored
fix: check correct variables for profiles/traces rand (#5447)
1 parent 1541e3c commit 76950aa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
- Fix building with Xcode 26 (#5386)
1212
- Fix usage of `@available` to be `iOS` instead of `iOSApplicationExtension` (#5361)
13+
- Robustness against corrupt launch profile configuration files (#5447)
1314

1415
### Improvements
1516

Sources/Sentry/Profiling/SentryLaunchProfiling.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@
271271
profileOptions.sessionSampleRate = profilesRate.floatValue;
272272

273273
NSNumber *profilesRand = launchConfig[kSentryLaunchProfileConfigKeyProfilesSampleRand];
274-
if (profilesRate == nil) {
274+
if (profilesRand == nil) {
275275
SENTRY_LOG_DEBUG(@"Received a nil configured launch profile sample rand, will not "
276276
@"start trace profiler for launch.");
277277
return;
@@ -285,7 +285,7 @@
285285
}
286286

287287
NSNumber *tracesRand = launchConfig[kSentryLaunchProfileConfigKeyTracesSampleRand];
288-
if (tracesRate == nil) {
288+
if (tracesRand == nil) {
289289
SENTRY_LOG_DEBUG(@"Received a nil configured launch trace sample rand, will not start "
290290
@"trace profiler for launch.");
291291
return;

0 commit comments

Comments
 (0)