1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

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

This commit is contained in:
ed 2021-12-22 09:43:41 +00:00
parent e329f524a2
commit 96383fb504

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;