summaryrefslogtreecommitdiff
path: root/src/protocols/core/DataDevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocols/core/DataDevice.cpp')
-rw-r--r--src/protocols/core/DataDevice.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/protocols/core/DataDevice.cpp b/src/protocols/core/DataDevice.cpp
index 9447f04f..b4bb8b00 100644
--- a/src/protocols/core/DataDevice.cpp
+++ b/src/protocols/core/DataDevice.cpp
@@ -731,14 +731,16 @@ bool CWLDataDeviceProtocol::wasDragSuccessful() {
}
#ifndef NO_XWAYLAND
- for (auto const& o : g_pXWayland->pWM->dndDataOffers) {
- if (o->dead || !o->source || !o->source->hasDnd())
- continue;
+ if (g_pXWayland->pWM) {
+ for (auto const& o : g_pXWayland->pWM->dndDataOffers) {
+ if (o->dead || !o->source || !o->source->hasDnd())
+ continue;
- if (o->source != dnd.currentSource)
- continue;
+ if (o->source != dnd.currentSource)
+ continue;
- return true;
+ return true;
+ }
}
#endif