From 16aeb84cd35996a6b41f10cbc48a677eeccc911c Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 2 Jan 2021 13:50:34 +0000 Subject: Fix potential destruction crashes (#5095) * Fix potential destruction crashes * Fix destructors accessing destroyted objects * Fix cPlayer not destroying windows (Destroyed never called) * Tentatively fixes #4608, fixes #3236, fixes #3262 - Remove cEntity::Destroyed() and replace with cEntity::OnRemoveFromWorld() * Add missing call to OnRemoveFromWorld --- src/Mobs/PassiveMonster.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/Mobs/PassiveMonster.h') diff --git a/src/Mobs/PassiveMonster.h b/src/Mobs/PassiveMonster.h index 15900a95d..400cc3885 100644 --- a/src/Mobs/PassiveMonster.h +++ b/src/Mobs/PassiveMonster.h @@ -30,10 +30,4 @@ public: /** When hit by someone, run away */ virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override; - - virtual void Destroyed(void) override; }; - - - - -- cgit v1.2.3