There will be crashed when connect is null, so we need avoid crash by checking connect value.
From: Wei xie xiewei@linuxdeepin.com
Signed-off-by: Wei xie xiewei@linuxdeepin.com --- dlls/wininet/netconnection.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index 06aa5c82f6c..2c4542b9011 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -596,6 +596,9 @@ DWORD NETCON_secure_connect(netconn_t *connection, server_t *server) { DWORD res;
+ if (!is_valid_netconn(connection)) + return ERROR_INTERNET_CANNOT_CONNECT; + /* can't connect if we are already connected */ if(connection->secure) { ERR("already connected\n");
What's the reason for this being NULL? Is the connection closed in some callback? I wonder if we should break connection attempt sooner instead.