mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-09 16:05:58 +01:00
fix incorrect mem use after delete
This commit is contained in:
parent
bef4d7c9b7
commit
0273d21a77
1 changed files with 2 additions and 1 deletions
|
@ -74,7 +74,6 @@ void Events::listener_destroyLayerSurface(void* owner, void* data) {
|
|||
|
||||
// remove the layersurface as it's not used anymore
|
||||
PMONITOR->m_aLayerSurfaceLists[layersurface->layer].remove(layersurface);
|
||||
delete layersurface;
|
||||
|
||||
// rearrange to fix the reserved areas
|
||||
if (PMONITOR) {
|
||||
|
@ -85,6 +84,8 @@ void Events::listener_destroyLayerSurface(void* owner, void* data) {
|
|||
wlr_box geomFixed = {layersurface->geometry.x + PMONITOR->vecPosition.x, layersurface->geometry.y + PMONITOR->vecPosition.y, layersurface->geometry.width, layersurface->geometry.height};
|
||||
g_pHyprRenderer->damageBox(&geomFixed);
|
||||
}
|
||||
|
||||
delete layersurface;
|
||||
}
|
||||
|
||||
void Events::listener_mapLayerSurface(void* owner, void* data) {
|
||||
|
|
Loading…
Reference in a new issue