From 4519469547c0f8befe74e3e80a94efb0e076ba34 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 22 Sep 2020 21:21:47 +0100 Subject: Do not call into things we don't own in destructors - Remove improper accesses in cChunk destructor * Fixes #4894 --- src/BlockEntities/JukeboxEntity.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/BlockEntities/JukeboxEntity.cpp') diff --git a/src/BlockEntities/JukeboxEntity.cpp b/src/BlockEntities/JukeboxEntity.cpp index 11d50b19a..b99d9d39c 100644 --- a/src/BlockEntities/JukeboxEntity.cpp +++ b/src/BlockEntities/JukeboxEntity.cpp @@ -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); -- cgit v1.2.3