1
0

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:
worktycho 2014-08-31 21:14:42 +01:00
parent 3e7332c70c
commit 361b7d5379

View File

@ -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 :