Skip to content

Commit c2eff1c

Browse files
wemstadChristian
authored andcommitted
Added speculative fix for invalid memory access when app is in background
1 parent d1c9bd6 commit c2eff1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/PeachCollector/PeachCollectorEvent.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ - (void)send
246246

247247
- (BOOL)shouldBeFlushedWhenReceivedInBackgroundState
248248
{
249-
if (self.type != nil) {
249+
if (self != nil && self.type != nil) {
250250
return [[[PeachCollector sharedCollector] flushableEventTypes] containsObject:self.type];
251251
}
252252
return NO;

0 commit comments

Comments
 (0)