summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread/qthread.cpp')
-rw-r--r--src/corelib/thread/qthread.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index 61294deee25..5af1787fb11 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -68,7 +68,7 @@ QThreadData::~QThreadData()
for (qsizetype i = 0; i < postEventList.size(); ++i) {
const QPostEvent &pe = postEventList.at(i);
if (pe.event) {
- --pe.receiver->d_func()->postedEvents;
+ pe.receiver->d_func()->postedEvents.fetchAndSubRelaxed(1);
pe.event->m_posted = false;
delete pe.event;
}