Fix crash on drag and drop from xwayland to wayland clients

During DataDevice migration we moved dataDevicesForSurface away from the
existing template macro due to inheritance reasons at the time.

The SeatInterface::setDragTarget() is used with null surfaces
This commit is contained in:
David Edmundson 2020-10-26 17:59:50 +00:00
parent 571b7e86a8
commit 3c7715ce30

View file

@ -234,6 +234,9 @@ QVector<TouchInterface *> SeatInterface::Private::touchsForSurface(SurfaceInterf
QVector<DataDeviceInterface *> SeatInterface::Private::dataDevicesForSurface(SurfaceInterface *surface) const
{
if (!surface) {
return {};
}
QVector<DataDeviceInterface *> primarySelectionDevices;
for (auto it = dataDevices.constBegin(); it != dataDevices.constEnd(); ++it) {
if ((*it)->client() == *surface->client()) {