Do not call into things we don't own in destructors
- Remove improper accesses in cChunk destructor * Fixes #4894
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user