From 1bd29906029ec4decd237e31258acd6fd89462c5 Mon Sep 17 00:00:00 2001 From: khanhduytran0 Date: Tue, 27 Aug 2024 21:29:48 +0700 Subject: [PATCH] Fix: potential crash after closing app with non-zero exit --- Natives/PLLogOutputView.m | 5 +---- Natives/SurfaceViewController+Navigation.m | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Natives/PLLogOutputView.m b/Natives/PLLogOutputView.m index 4275a31da9..57be7f09d5 100644 --- a/Natives/PLLogOutputView.m +++ b/Natives/PLLogOutputView.m @@ -124,10 +124,7 @@ - (void)actionStartStopLogOutput { - (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; } diff --git a/Natives/SurfaceViewController+Navigation.m b/Natives/SurfaceViewController+Navigation.m index 8d9a30e894..411173f893 100644 --- a/Natives/SurfaceViewController+Navigation.m +++ b/Natives/SurfaceViewController+Navigation.m @@ -119,7 +119,6 @@ - (void)actionForceClose { exit(0); } else { dispatch_group_leave(fatalExitGroup); - fatalExitGroup = nil; } }]; }];