Changed null check to assert
Changed the null check to clarify that the function should not be called before the entity has been attached to a world.
This commit is contained in:
parent
3e7332c70c
commit
361b7d5379
@ -188,12 +188,10 @@ void cCommandBlockEntity::SaveToJson(Json::Value & a_Value)
|
||||
|
||||
void cCommandBlockEntity::Execute()
|
||||
{
|
||||
if (m_World != NULL)
|
||||
ASSERT(m_World != NULL); //Execute should not be called before the command block is attached to a world
|
||||
if (!m_World->AreCommandBlocksEnabled())
|
||||
{
|
||||
if (!m_World->AreCommandBlocksEnabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
class CommandBlockOutCb :
|
||||
|
Loading…
x
Reference in New Issue
Block a user