diff --git a/toxcore/TCP_client.c b/toxcore/TCP_client.c index 61a2ff1e..eaa248bf 100644 --- a/toxcore/TCP_client.c +++ b/toxcore/TCP_client.c @@ -609,6 +609,7 @@ TCP_Client_Connection *new_TCP_connection(IP_Port ip_port, const uint8_t *public uint8_t family = ip_port.ip.family; TCP_Proxy_Info default_proxyinfo; + if (proxy_info == NULL) { default_proxyinfo.proxy_type = TCP_PROXY_NONE; proxy_info = &default_proxyinfo; diff --git a/toxcore/tox.h b/toxcore/tox.h index c5a5d952..db1b1033 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h @@ -875,8 +875,8 @@ int tox_isconnected(const Tox *tox); typedef enum { TOX_PROXY_NONE, - TOX_PROXY_HTTP, - TOX_PROXY_SOCKS5 + TOX_PROXY_SOCKS5, + TOX_PROXY_HTTP } TOX_PROXY_TYPE; typedef struct {