Commit a6646770 authored by David Edmundson's avatar David Edmundson
Browse files

Scope dragAndDropActionsChanged to source lifespan

The source can have a different lifespan to the offer being made.
If a source is removed and we get a drag actions changed before the
offer is cancelled we don't want to crash.

Couldn't reproduce locally, but the trace was good.

BUG: 423127
parent 07369dfe
......@@ -355,7 +355,7 @@ void DataDeviceInterface::updateDragTarget(SurfaceInterface *surface, quint32 se
offer->dndAction(action);
source->dndAction(action);
};
d->drag.targetActionConnection = connect(offer, &DataOfferInterface::dragAndDropActionsChanged, offer, matchOffers);
d->drag.targetActionConnection = connect(offer, &DataOfferInterface::dragAndDropActionsChanged, source, matchOffers);
d->drag.sourceActionConnection = connect(source, &DataSourceInterface::supportedDragAndDropActionsChanged, source, matchOffers);
}
d->client->flush();
......
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