diff --git a/libfreerdp/crypto/tls.c b/libfreerdp/crypto/tls.c index 1b5c92ab8..3b97486b5 100644 --- a/libfreerdp/crypto/tls.c +++ b/libfreerdp/crypto/tls.c @@ -360,6 +360,9 @@ BOOL tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_file) BOOL tls_disconnect(rdpTls* tls) { + if (!tls) + return FALSE; + if (tls->ssl) SSL_shutdown(tls->ssl);