-
Notifications
You must be signed in to change notification settings - Fork 544
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 'use after free' when deleting battlegrounds.
BattleGroundMap::Update() is calling Update() on the BattleGround associated with the map, which is typically the Update() call of a derived class like BattleGroundAB. These start by calling the base function BattleGround::Update(). So when BattleGround::Update() decides to delete the battleground and return, this is kind of sawing off the branch we're still sitting on! If the object gets deleted, the Update() call of the derived class can't doing anything any more, but in practice it was happily continuing with its own Update() code, leading to all kinds of nasty things (and usually a crash).
- Loading branch information
1 parent
091374d
commit 2c987ba
Showing
2 changed files
with
17 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters