mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Fixes HTTPClient::poll crash after connection is self-assigned
(cherry picked from commit 8226cee8d8)
This commit is contained in:
committed by
Rémi Verschelde
parent
78143ee93e
commit
9119560d4d
@@ -100,6 +100,10 @@ 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 (connection == p_connection) {
|
||||
return;
|
||||
}
|
||||
|
||||
close();
|
||||
connection = p_connection;
|
||||
status = STATUS_CONNECTED;
|
||||
|
||||
Reference in New Issue
Block a user