diff --git a/src/xwl/transfer.cpp b/src/xwl/transfer.cpp index f557c0df8c..6ba4c7b234 100644 --- a/src/xwl/transfer.cpp +++ b/src/xwl/transfer.cpp @@ -111,6 +111,7 @@ void TransferWltoX::startTransferFromSource() int TransferWltoX::flushSourceData() { + Q_ASSERT(!m_chunks.isEmpty()); xcb_connection_t *xcbConn = kwinApp()->x11Connection(); xcb_change_property(xcbConn, @@ -258,7 +259,7 @@ void TransferWltoX::handlePropertyDelete() xcb_flush(xcbConn); m_flushPropertyOnDelete = false; endTransfer(); - } else { + } else if (!m_chunks.isEmpty()) { flushSourceData(); } }