Merge pull request #346 from liyunfan1223/fix-crash-avoid-aoe

[Crash fix] Owner check for AvoidAuraWithDynamicObj
This commit is contained in:
Yunfan Li 2024-07-16 12:47:16 +08:00 committed by GitHub
commit 9b1736e61f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1535,6 +1535,9 @@ bool AvoidAoeAction::AvoidAuraWithDynamicObj()
if (!aura || aura->IsRemoved() || aura->IsExpired()) { if (!aura || aura->IsRemoved() || aura->IsExpired()) {
return false; return false;
} }
if (!aura->GetOwner() || !aura->GetOwner()->IsInWorld()) {
return false;
}
// Crash fix: maybe change owner due to check interval // Crash fix: maybe change owner due to check interval
if (aura->GetType() != DYNOBJ_AURA_TYPE) { if (aura->GetType() != DYNOBJ_AURA_TYPE) {
return false; return false;