Skip to content

Commit 3b7198b

Browse files
committed
Merge pull request swisspol#105 from nickgravelyn/fix-crash-in-ios-unit-test
Prevent GWS_DNOT_REACHED when there is no application
2 parents 059f5c8 + abb8913 commit 3b7198b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

GCDWebServer/Core/GCDWebServer.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ - (void)_endBackgroundTask {
283283
[[UIApplication sharedApplication] endBackgroundTask:_backgroundTask];
284284
_backgroundTask = UIBackgroundTaskInvalid;
285285
GWS_LOG_DEBUG(@"Did end background task");
286-
} else {
286+
} else if ([UIApplication sharedApplication]) {
287287
GWS_DNOT_REACHED();
288288
}
289289
}

0 commit comments

Comments
 (0)