mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 06:01:56 -07:00
subsurfaces: avoid reading destroyed surfaces
This commit is contained in:
@@ -188,11 +188,12 @@ void Events::listener_unmapSubsurface(void* owner, void* data) {
|
|||||||
std::find_if(SubsurfaceTree::surfaceTreeNodes.begin(), SubsurfaceTree::surfaceTreeNodes.end(), [&](const SSurfaceTreeNode& other) { return &other == PNODE; });
|
std::find_if(SubsurfaceTree::surfaceTreeNodes.begin(), SubsurfaceTree::surfaceTreeNodes.end(), [&](const SSurfaceTreeNode& other) { return &other == PNODE; });
|
||||||
|
|
||||||
if (IT != SubsurfaceTree::surfaceTreeNodes.end()) {
|
if (IT != SubsurfaceTree::surfaceTreeNodes.end()) {
|
||||||
|
if (PNODE->pSurface && PNODE->pSurface->exists()) {
|
||||||
int lx = 0, ly = 0;
|
int lx = 0, ly = 0;
|
||||||
addSurfaceGlobalOffset(PNODE, &lx, &ly);
|
addSurfaceGlobalOffset(PNODE, &lx, &ly);
|
||||||
|
|
||||||
wlr_box extents = {lx, ly, 0, 0};
|
wlr_box extents = {lx, ly, 0, 0};
|
||||||
if (PNODE->pSurface && PNODE->pSurface->exists()) {
|
|
||||||
extents.width = PNODE->pSurface->wlr()->current.width;
|
extents.width = PNODE->pSurface->wlr()->current.width;
|
||||||
extents.height = PNODE->pSurface->wlr()->current.height;
|
extents.height = PNODE->pSurface->wlr()->current.height;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user