diff options
author | Muxi Yan <mxyan@google.com> | 2018-11-15 14:56:50 -0800 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2018-11-15 14:56:50 -0800 |
commit | ffeb0e682393e5b76d732e0b034c71f3837b9e57 (patch) | |
tree | 6670407948c46fafdc7ac711cbc9e2803af8dfa2 /src/objective-c/GRPCClient/private/GRPCChannelPool.m | |
parent | 57464321214a5ce34e5de1868ce4eb3624ebdebb (diff) |
Add *if* after assert
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCChannelPool.m')
-rw-r--r-- | src/objective-c/GRPCClient/private/GRPCChannelPool.m | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCChannelPool.m b/src/objective-c/GRPCClient/private/GRPCChannelPool.m index 72554ca6dc..5e2e9bcfeb 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannelPool.m +++ b/src/objective-c/GRPCClient/private/GRPCChannelPool.m @@ -71,6 +71,9 @@ static dispatch_once_t gInitChannelPool; destroyDelay:(NSTimeInterval)destroyDelay { NSAssert(host.length > 0, @"Host must not be empty."); NSAssert(callOptions != nil, @"callOptions must not be empty."); + if (host.length == 0) return nil; + if (callOptions == nil) return nil; + GRPCChannel *channel; GRPCChannelConfiguration *configuration = [[GRPCChannelConfiguration alloc] initWithHost:host callOptions:callOptions]; |