summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 3f717ae2df..e594f1fedc 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -998,8 +998,11 @@ void QXcbEventReader::run()
emit eventPending();
}
+ m_mutex.lock();
for (int i = 0; i < m_events.size(); ++i)
free(m_events.at(i));
+ m_events.clear();
+ m_mutex.unlock();
}
void QXcbEventReader::addEvent(xcb_generic_event_t *event)