diff options
author | vaxerski <[email protected]> | 2022-05-14 11:10:50 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-05-14 11:10:50 +0200 |
commit | 0273d21a77074a0fdeacdaecbb4255aef2883a51 (patch) | |
tree | b6d478c3fca7400bfd88a182ff13b02f5c6601f7 /src | |
parent | bef4d7c9b74029d0752f99291e007bba593b9b08 (diff) | |
download | Hyprland-0273d21a77074a0fdeacdaecbb4255aef2883a51.tar.gz Hyprland-0273d21a77074a0fdeacdaecbb4255aef2883a51.zip |
fix incorrect mem use after delete
Diffstat (limited to 'src')
-rw-r--r-- | src/events/Layers.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/events/Layers.cpp b/src/events/Layers.cpp index d3cbdef0..12e9e93b 100644 --- a/src/events/Layers.cpp +++ b/src/events/Layers.cpp @@ -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) { |