From 6c45b1817f1f56207dae8aa028b9cbb922dc8008 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Mon, 20 Apr 2020 12:51:15 +0200 Subject: SslSocketClient - fix example not to crash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to the bug related to the 'new syntax' signal/slot connections, it's unfortunately possible to have a connection not deleted properly by the moment children objects get deleted. Then, as a result, in e.g. QSslSocket's destructor the socket will change its state, triggering the (now deleted) UI elements' access. Note - the original bug was reported, the patch (only possible?) was not accepted. Fixes: QTBUG-83659 Change-Id: I2965532485bcd46f93f8449e4d0a30da92b572c5 Reviewed-by: MÃ¥rten Nordheim --- examples/network/securesocketclient/sslclient.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'examples') diff --git a/examples/network/securesocketclient/sslclient.cpp b/examples/network/securesocketclient/sslclient.cpp index d6c52a1c66..949edd39c7 100644 --- a/examples/network/securesocketclient/sslclient.cpp +++ b/examples/network/securesocketclient/sslclient.cpp @@ -63,6 +63,7 @@ SslClient::SslClient(QWidget *parent) SslClient::~SslClient() { + delete socket; delete form; } -- cgit v1.2.3