diff --git a/src/wayland/datacontroldevice_v1_interface.cpp b/src/wayland/datacontroldevice_v1_interface.cpp index 46104978ab..3439c19f83 100644 --- a/src/wayland/datacontroldevice_v1_interface.cpp +++ b/src/wayland/datacontroldevice_v1_interface.cpp @@ -117,11 +117,11 @@ void DataControlDeviceV1Interface::sendSelection(AbstractDataSource *other) sendClearSelection(); return; } - auto r = d->createDataOffer(other); - if (!r) { + DataControlOfferV1Interface *offer = d->createDataOffer(other); + if (!offer) { return; } - d->send_selection(r->resource()); + d->send_selection(offer->resource()); } void DataControlDeviceV1Interface::sendClearSelection()