Skip to content
  • Martin Flöser's avatar
    [server] Fix possible crash on creation of DataDevice · b03cda2b
    Martin Flöser authored
    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.
    
    Reviewers: #plasma_on_wayland
    
    Subscribers: plasma-devel
    
    Tags: #plasma_on_wayland
    
    Differential Revision: https://phabricator.kde.org/D3149
    b03cda2b