mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-13 08:45:59 +01:00
fix crash
This commit is contained in:
parent
8dbaef2982
commit
1c5c905c25
1 changed files with 8 additions and 0 deletions
|
@ -124,6 +124,14 @@ CMesaDRMProtocol::CMesaDRMProtocol(const wl_interface* iface, const int& ver, co
|
|||
nodeName = dev->nodes[DRM_NODE_RENDER];
|
||||
} else {
|
||||
ASSERT(dev->available_nodes & (1 << DRM_NODE_PRIMARY));
|
||||
|
||||
if (!dev->nodes[DRM_NODE_PRIMARY]) {
|
||||
LOGM(ERR, "No DRM render node available, both render and primary are null, disabling MesaDRM");
|
||||
drmFreeDevice(&dev);
|
||||
removeGlobal();
|
||||
return;
|
||||
}
|
||||
|
||||
LOGM(WARN, "No DRM render node, falling back to primary {}", dev->nodes[DRM_NODE_PRIMARY]);
|
||||
nodeName = dev->nodes[DRM_NODE_PRIMARY];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue