Commit 96365163 authored by Martin Flöser's avatar Martin Flöser
Browse files

Add safety checks to DataDeviceInterface

It's possible that the Resource got already unbound when calling
into clear selection, etc.
parent 91fa946e
......@@ -174,12 +174,18 @@ void DataDeviceInterface::sendSelection(DataDeviceInterface *other)
if (!r) {
return;
}
if (!d->resource) {
return;
}
wl_data_device_send_selection(d->resource, r->resource());
}
void DataDeviceInterface::sendClearSelection()
{
Q_D();
if (!d->resource) {
return;
}
wl_data_device_send_selection(d->resource, nullptr);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment