mirror of
https://github.com/hyprwm/Hyprland
synced 2025-01-10 14:29:47 +01: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:
parent
f390f48a07
commit
f1a7a7497e
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue