graesslin added a comment.

  In https://phabricator.kde.org/D7078#134111, @davidedmundson wrote:
  
  > Isn't the real bug from that trace here:
  >
  > datadevice_interface.cpp:204
  >  void DataDeviceInterface::sendSelection(DataDeviceInterface *other)
  >  d->createDataOffer(other->selection());
  >
  > 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.

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D7078

To: graesslin, #kwin, #plasma, #frameworks
Cc: davidedmundson, plasma-devel, leezu, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, mart, hein, lukas

Reply via email to