diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-04-20 12:51:15 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-04-22 13:03:45 +0200 |
commit | 6c45b1817f1f56207dae8aa028b9cbb922dc8008 (patch) | |
tree | fba4ed726eddf5e3dfc3c452f4712f72889f3f06 /examples/network | |
parent | e10e5318bc02a48a866b76b6f0b7f268d16af642 (diff) | |
download | qtbase-6c45b1817f1f56207dae8aa028b9cbb922dc8008.tar.gz |
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/network')
-rw-r--r-- | examples/network/securesocketclient/sslclient.cpp | 1 |
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; } |