mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-25 17:21:54 -07:00
seatmgr: avoid crash on null surfs
This commit is contained in:
@@ -606,11 +606,11 @@ void CSeatManager::setGrab(SP<CSeatGrab> grab) {
|
||||
|
||||
if (!refocus) {
|
||||
surf = CWLSurface::fromResource(currentFocus);
|
||||
layer = surf->getLayer();
|
||||
layer = surf ? surf->getLayer() : nullptr;
|
||||
}
|
||||
|
||||
if (!refocus && !layer) {
|
||||
auto popup = surf->getPopup();
|
||||
auto popup = surf ? surf->getPopup() : nullptr;
|
||||
if (popup) {
|
||||
auto parent = popup->getT1Owner();
|
||||
layer = parent->getLayer();
|
||||
|
Reference in New Issue
Block a user