summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2020-04-20 12:51:15 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2020-04-22 13:03:45 +0200
commit6c45b1817f1f56207dae8aa028b9cbb922dc8008 (patch)
treefba4ed726eddf5e3dfc3c452f4712f72889f3f06 /examples
parente10e5318bc02a48a866b76b6f0b7f268d16af642 (diff)
SslSocketClient - fix example not to crash
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 <marten.nordheim@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/network/securesocketclient/sslclient.cpp1
1 files changed, 1 insertions, 0 deletions
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;
}