Fix: potential crash after closing app with non-zero exit

This commit is contained in:
khanhduytran0 committed 2024-08-27 21:30:21 +07:00
1 parent b4e4455c37
commit 1bd2990602
2 files changed
+1 -5

No files matched your search

+1 -4
View File
@@ -124,10 +124,7 @@ static PLLogOutputView* current;
- (void)actionToggleLogOutput {
if (fatalErrorOccurred) {
[UIApplication.sharedApplication performSelector:@selector(suspend)];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 200 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{
dispatch_group_leave(fatalExitGroup);
fatalExitGroup = nil;
});
dispatch_group_leave(fatalExitGroup);
return;
}
@@ -119,7 +119,6 @@ static CGPoint lastCenterPoint;
exit(0);
} else {
dispatch_group_leave(fatalExitGroup);
fatalExitGroup = nil;
}
}];
}];