animationMgr: avoid uaf in ::tick() if handleUpdate destroys AV
ref https://github.com/hyprwm/Hyprland/discussions/12840
This commit is contained in:
parent
3dcaadbdf5
commit
eb623bd91d
1 changed files with 3 additions and 0 deletions
|
|
@ -216,6 +216,9 @@ void CHyprAnimationManager::tick() {
|
||||||
if (!PAV)
|
if (!PAV)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// lock this value while we are doing handleUpdate to avoid a UAF if an update callback destroys it
|
||||||
|
const auto LOCK = PAV.lock();
|
||||||
|
|
||||||
// for disabled anims just warp
|
// for disabled anims just warp
|
||||||
bool warp = !*PANIMENABLED || !PAV->enabled();
|
bool warp = !*PANIMENABLED || !PAV->enabled();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue