Don't crash if Clipboard and Selection hold the same mimedate
Cliboard and Selection can hold the same QMimeData object. Don't delete the mimedata in this case before when clearing only one of them. Reviewed-by: Samuel
This commit is contained in:
parent
7a64f12cfe
commit
1c86896f53
@ -272,7 +272,8 @@ void QXcbClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
|
||||
|
||||
xcb_window_t newOwner = XCB_NONE;
|
||||
|
||||
delete m_clientClipboard[mode];
|
||||
if (m_clientClipboard[QClipboard::Clipboard] != m_clientClipboard[QClipboard::Selection])
|
||||
delete m_clientClipboard[mode];
|
||||
m_clientClipboard[mode] = 0;
|
||||
m_timestamp[mode] = XCB_CURRENT_TIME;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user