1
0

Do not call into things we don't own in destructors

- Remove improper accesses in cChunk destructor
* Fixes #4894
This commit is contained in:
Tiger Wang
2020-09-22 21:21:47 +01:00
parent 10bd15a11e
commit 4519469547
9 changed files with 35 additions and 55 deletions

View File

@@ -24,19 +24,6 @@ cJukeboxEntity::cJukeboxEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Ve
cJukeboxEntity::~cJukeboxEntity()
{
if (m_World && IsPlayingRecord())
{
// Stop playing music when destroyed by any means
m_World->BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_PLAY_MUSIC_DISC, GetPos(), 0);
}
}
void cJukeboxEntity::Destroy(void)
{
ASSERT(m_World != nullptr);