mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-25 17:21:54 -07:00
datadevice: guard XWayland server against crashes
The server might be dead or restarting, and we'd deref null ref #7822
This commit is contained in:
@@ -417,7 +417,7 @@ void CWLDataDeviceProtocol::destroyResource(CWLDataOfferResource* resource) {
|
||||
|
||||
SP<IDataDevice> 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
|
||||
|
||||
|
Reference in New Issue
Block a user