2
0
mirror of https://github.com/godotengine/godot.git synced 2025-04-25 01:48:08 +08:00

Merge pull request from pdfrod/fix-crash-on-httpclient-poll

Fix crash on HTTPClient::poll method
This commit is contained in:
Rémi Verschelde 2021-03-03 23:07:34 +01:00 committed by GitHub
commit 44e73473c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -96,6 +96,11 @@ Error HTTPClient::connect_to_host(const String &p_host, int p_port, bool p_ssl,
void HTTPClient::set_connection(const Ref<StreamPeer> &p_connection) {
ERR_FAIL_COND_MSG(p_connection.is_null(), "Connection is not a reference to a valid StreamPeer object.");
if (ssl) {
ERR_FAIL_NULL_MSG(Object::cast_to<StreamPeerSSL>(p_connection.ptr()),
"Connection is not a reference to a valid StreamPeerSSL object.");
}
if (connection == p_connection) {
return;
}