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:
parent
e329f524a2
commit
96383fb504
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue