[server] Fix possible crash on creation of DataDevice
ClosedPublic

Authored by graesslin on Oct 24 2016, 9:08 AM.

Details

Summary

This is a similar condition as D3148. If a DataDeviceInterface is
created for the currently focused keyboard Surface the current selection
is sent to the new DataDeviceInterface. If the current selection does
not have a DataSourceInterface a DataOfferInterface for a null
DataSourceInterface would be created and result in a crash.

This change verifies that there is a DataSourcInterface on the current
selection prior to sending out the selection.

Test Plan

A test case is added which simulates the condition by
using two clients.

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 7632.Oct 24 2016, 9:08 AM
graesslin retitled this revision from to [server] Fix possible crash on creation of DataDevice.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added a reviewer: Plasma on Wayland.
Restricted Application added a project: Plasma on Wayland. · View Herald TranscriptOct 24 2016, 9:08 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
bshah accepted this revision.Oct 25 2016, 9:51 AM
bshah added a reviewer: bshah.
This revision is now accepted and ready to land.Oct 25 2016, 9:51 AM