mirror of
https://github.com/hyprwm/Hyprland
synced 2026-04-07 17:40:41 +02:00
seatmgr: avoid crash on null surfs
This commit is contained in:
parent
cca0f48b74
commit
03385fc07f
1 changed files with 2 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue