Browse Source

macOS: Fix nullptr dereference in WebInputStream on macOS versions < 10.10

v6.1.6
ed 4 years ago
parent
commit
96383fb504
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      modules/juce_core/native/juce_mac_Network.mm

+ 2
- 1
modules/juce_core/native/juce_mac_Network.mm View File

@@ -969,6 +969,7 @@ public:
if (! connection->start (owner, webInputListener))
{
const auto errorCode = connection->getErrorCode();
connection.reset();
if (@available (macOS 10.10, *))
@@ -976,7 +977,7 @@ public:
// Workaround for macOS versions below 10.10 where HTTPS POST requests with keep-alive
// fail with the NSURLErrorNetworkConnectionLost error code.
if (numRetries == 0 && connection->getErrorCode() == NSURLErrorNetworkConnectionLost)
if (numRetries == 0 && errorCode == NSURLErrorNetworkConnectionLost)
return connect (webInputListener, ++numRetries);
return false;


Loading…
Cancel
Save