diff --git a/src/protocols/core/DataDevice.cpp b/src/protocols/core/DataDevice.cpp index 6ad17d7b..722eb9fd 100644 --- a/src/protocols/core/DataDevice.cpp +++ b/src/protocols/core/DataDevice.cpp @@ -417,7 +417,7 @@ void CWLDataDeviceProtocol::destroyResource(CWLDataOfferResource* resource) { SP CWLDataDeviceProtocol::dataDeviceForClient(wl_client* c) { #ifndef NO_XWAYLAND - if (c == g_pXWayland->pServer->xwaylandClient) + if (g_pXWayland->pServer && c == g_pXWayland->pServer->xwaylandClient) return g_pXWayland->pWM->getDataDevice(); #endif