Skip to content

Commit

Permalink
Make sure bsg_runContext is initialized properly
Browse files Browse the repository at this point in the history
  • Loading branch information
kstenerud committed Nov 8, 2023
1 parent 612e909 commit 1778920
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Bugsnag/Client/BugsnagClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,12 @@ - (void)start {
// from the start method.
[self.configuration validate];

// MUST be called before BSGRunContextInit to initialize bsg_runContext
BSGCrashSentryInstall(self.configuration, BSSerializeDataCrashHandler);

// MUST be called before any code that accesses bsg_runContext
BSGRunContextInit(BSGFileLocations.current.runContext);

BSGCrashSentryInstall(self.configuration, BSSerializeDataCrashHandler);

self.systemState = [[BugsnagSystemState alloc] initWithConfiguration:self.configuration];

// add metadata about app/device
Expand Down

0 comments on commit 1778920

Please sign in to comment.