From 9c33c83351a1fe926941b9234d43b7b915b5ad67 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Latour Date: Thu, 5 Mar 2015 16:48:11 -0800 Subject: [PATCH] Handle starting the server with nil options --- GCDWebServer/Core/GCDWebServer.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GCDWebServer/Core/GCDWebServer.m b/GCDWebServer/Core/GCDWebServer.m index 2d8d801..0a8d31e 100644 --- a/GCDWebServer/Core/GCDWebServer.m +++ b/GCDWebServer/Core/GCDWebServer.m @@ -664,7 +664,7 @@ static inline NSString* _EncodeBase64(NSString* string) { - (BOOL)startWithOptions:(NSDictionary*)options error:(NSError**)error { if (_options == nil) { - _options = [options copy]; + _options = options ? [options copy] : @{}; #if TARGET_OS_IPHONE _suspendInBackground = [_GetOption(_options, GCDWebServerOption_AutomaticallySuspendInBackground, @YES) boolValue]; if (((_suspendInBackground == NO) || ([[UIApplication sharedApplication] applicationState] != UIApplicationStateBackground)) && ![self _start:error])