diff --git a/modules/juce_core/native/juce_mac_Network.mm b/modules/juce_core/native/juce_mac_Network.mm index 0730ba1201..ebba5b88d5 100644 --- a/modules/juce_core/native/juce_mac_Network.mm +++ b/modules/juce_core/native/juce_mac_Network.mm @@ -965,6 +965,9 @@ public: createConnection(); } + if (connection == nullptr) + return false; + if (! connection->start (owner, webInputListener)) { // Workaround for deployment targets below 10.10 where HTTPS POST requests with keep-alive fail with the NSURLErrorNetworkConnectionLost error code. @@ -980,7 +983,7 @@ public: return false; } - if (connection != nullptr && connection->headers != nil) + if (connection->headers != nil) { statusCode = connection->statusCode;