graesslin added a comment.
In https://phabricator.kde.org/D7078#134111, @davidedmundson wrote:
> Isn't the real bug from that trace here:
> void DataDeviceInterface::sendSelection(DataDeviceInterface *other)
> it's valid for other->selection() to be null, so this should be guarded
there. If I do that your modified unit test passes.
> Guarding inside the method I fear will mask future bugs.
Guarding there would be result in incorrect state. We went into sendSelection
because there is a selection. That the source is null doesn't really matter.
But we have to inform the DDI which gets the selection which selection there
is. If not it still operates on outdated data. So I thought it's better to
continue there and ensure the DataOffer is created.
To: graesslin, #kwin, #plasma, #frameworks
Cc: davidedmundson, plasma-devel, leezu, ZrenBot, progwolff, lesliezhai,
ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, mart, hein, lukas