No-thread: prevent double delete of QThreadPrivate

Change-Id: Ie34c06ad798be6bd91f5c356051daaa72800c20a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Morten Johan Sørvig 2018-08-30 12:30:11 +02:00
parent b4b706d454
commit 02f7444c85

View File

@ -879,6 +879,7 @@ QThreadPrivate::QThreadPrivate(QThreadData *d) : data(d ? d : new QThreadData)
QThreadPrivate::~QThreadPrivate()
{
data->thread = nullptr; // prevent QThreadData from deleting the QThreadPrivate (again).
delete data;
}