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
This commit is contained in:
parent
07369dfee0
commit
a664677051
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue