animationMgr: avoid uaf in ::tick() if handleUpdate destroys AV

ref https://github.com/hyprwm/Hyprland/discussions/12840
This commit is contained in:
Vaxry 2026-01-08 22:22:52 +01:00
parent 3dcaadbdf5
commit eb623bd91d
No known key found for this signature in database
GPG key ID: 665806380871D640

View file

@ -216,6 +216,9 @@ void CHyprAnimationManager::tick() {
if (!PAV)
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
bool warp = !*PANIMENABLED || !PAV->enabled();