data-device: fix edge case crash on null xwm

fixes #8787
This commit is contained in:
Vaxry 2024-12-21 15:08:00 +00:00
parent 71dc9f6128
commit 52ee7a8748

View file

@ -731,6 +731,7 @@ bool CWLDataDeviceProtocol::wasDragSuccessful() {
}
#ifndef NO_XWAYLAND
if (g_pXWayland->pWM) {
for (auto const& o : g_pXWayland->pWM->dndDataOffers) {
if (o->dead || !o->source || !o->source->hasDnd())
continue;
@ -740,6 +741,7 @@ bool CWLDataDeviceProtocol::wasDragSuccessful() {
return true;
}
}
#endif
return false;