diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2018-08-30 12:30:11 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2018-09-25 12:15:19 +0000 |
commit | 02f7444c8517ce107b826164b537092c25d342d5 (patch) | |
tree | 34af5c72cfc925f3cf02658594d6f82172f5129f /src/corelib | |
parent | b4b706d454b785aecbec5cefe46e2a6d7572edbf (diff) |
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>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/thread/qthread.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index 5df0508829..d2d6435004 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -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; } |