Fix a corner case freed memory use/crash
QWaylandDisplay::flushRequests() does not only flush them, but also dispatches the pending events. If we have two wl_data_device.selection events in the queue we must not dispatch the second one while we are dealing with the first one because that will replace the data offer and delete us while we're in QWaylandMimeData::retrieveData_sys(). Change-Id: Ib58ca571867faa2633daa9ec94fe7094df02e9fd Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
parent
202573e946
commit
9369a931d0
@ -136,7 +136,7 @@ QVariant QWaylandMimeData::retrieveData_sys(const QString &mimeType, QVariant::T
|
||||
}
|
||||
|
||||
m_dataOffer->receive(mime, pipefd[1]);
|
||||
m_display->flushRequests();
|
||||
wl_display_flush(m_display->wl_display());
|
||||
|
||||
close(pipefd[1]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user