mirror of
https://github.com/godotengine/godot.git
synced 2024-11-26 22:23:04 +00:00
Fix HTTPClient::poll crash when connection set to null
This commit is contained in:
parent
98caeb635c
commit
b73073ae36
@ -98,6 +98,8 @@ 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.");
|
||||
|
||||
close();
|
||||
connection = p_connection;
|
||||
status = STATUS_CONNECTED;
|
||||
|
Loading…
Reference in New Issue
Block a user