Crash in

I suddenly got some crashes when using the URL class.
My code is trying to download an image like this

URL imgUrl;

This has worked fine in the past, but I update the Juce code to the latest version, and I’m now getting crashes with this call.
I’m not sure what the root cause is, but I have tracked the issue down to the WebInputStream class and the connect function.

On about line 968 it calls:

if (! connection->start (owner, webInputListener))

Problem is that connection might be null (for reasons I don´t know), this will of course lead to an access violation.

inserting a check just before the “start” code seems to fix the issue.
I added this on line 967 of and all seems good.

if (connection == nullptr ) return false;

I should add that I run my code in a separate thread, not the message thread, is this not OK?

are you on the develop branch?
it seems it has been fixed a few days ago :

No we try to stay on the main brach as this project is live.
I will check out the develop branch.
thank you

I’ve just cherry-picked the fix onto the master branch.