mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2026-05-31 00:00:10 +08:00
Merge pull request #105 from nickgravelyn/fix-crash-in-ios-unit-test
Prevent GWS_DNOT_REACHED when there is no application
This commit is contained in:
@@ -283,7 +283,7 @@ static void _ExecuteMainThreadRunLoopSources() {
|
|||||||
[[UIApplication sharedApplication] endBackgroundTask:_backgroundTask];
|
[[UIApplication sharedApplication] endBackgroundTask:_backgroundTask];
|
||||||
_backgroundTask = UIBackgroundTaskInvalid;
|
_backgroundTask = UIBackgroundTaskInvalid;
|
||||||
GWS_LOG_DEBUG(@"Did end background task");
|
GWS_LOG_DEBUG(@"Did end background task");
|
||||||
} else {
|
} else if ([UIApplication sharedApplication]) {
|
||||||
GWS_DNOT_REACHED();
|
GWS_DNOT_REACHED();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user