diff --git a/Vendor/CocoaAsyncSocket/GCDAsyncSocket.m b/Vendor/CocoaAsyncSocket/GCDAsyncSocket.m index d541149781..b3975ee3b7 100644 --- a/Vendor/CocoaAsyncSocket/GCDAsyncSocket.m +++ b/Vendor/CocoaAsyncSocket/GCDAsyncSocket.m @@ -5835,25 +5835,29 @@ - (void)maybeStartTLS #if TARGET_OS_IPHONE { GCDAsyncSpecialPacket *tlsPacket = (GCDAsyncSpecialPacket *)currentRead; - NSDictionary *tlsSettings = tlsPacket->tlsSettings; - - NSNumber *value; - - value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLAllowsAnyRoot]; - if (value && [value boolValue] == YES) - canUseSecureTransport = NO; - - value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLAllowsExpiredRoots]; - if (value && [value boolValue] == YES) - canUseSecureTransport = NO; - - value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLValidatesCertificateChain]; - if (value && [value boolValue] == NO) - canUseSecureTransport = NO; - - value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLAllowsExpiredCertificates]; - if (value && [value boolValue] == YES) - canUseSecureTransport = NO; + + if(tlsPacket) + { + NSDictionary *tlsSettings = tlsPacket->tlsSettings; + + NSNumber *value = nil; + + value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLAllowsAnyRoot]; + if (value && [value boolValue] == YES) + canUseSecureTransport = NO; + + value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLAllowsExpiredRoots]; + if (value && [value boolValue] == YES) + canUseSecureTransport = NO; + + value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLValidatesCertificateChain]; + if (value && [value boolValue] == NO) + canUseSecureTransport = NO; + + value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLAllowsExpiredCertificates]; + if (value && [value boolValue] == YES) + canUseSecureTransport = NO; + } } #endif diff --git a/Vendor/CocoaLumberjack/DDAbstractDatabaseLogger.m b/Vendor/CocoaLumberjack/DDAbstractDatabaseLogger.m index c7366a69c5..5999136aac 100644 --- a/Vendor/CocoaLumberjack/DDAbstractDatabaseLogger.m +++ b/Vendor/CocoaLumberjack/DDAbstractDatabaseLogger.m @@ -204,7 +204,10 @@ - (void)createAndStartDeleteTimer [self updateDeleteTimer]; - dispatch_resume(deleteTimer); + if(deleteTimer != NULL) + { + dispatch_resume(deleteTimer); + } } } }