From afa60c5c351afd926f42f8bd9f91be92a2853dc0 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 4 Jun 2013 12:34:35 +0000 Subject: Fixed a crash when generating a chest git-svn-id: http://mc-server.googlecode.com/svn/trunk@1549 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/BlockEntities/BlockEntityWithItems.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/BlockEntities') diff --git a/source/BlockEntities/BlockEntityWithItems.h b/source/BlockEntities/BlockEntityWithItems.h index 77f4ebe2e..587b10461 100644 --- a/source/BlockEntities/BlockEntityWithItems.h +++ b/source/BlockEntities/BlockEntityWithItems.h @@ -74,8 +74,10 @@ protected: virtual void OnSlotChanged(cItemGrid * a_Grid, int a_SlotNum) { ASSERT(a_Grid == &m_Contents); - ASSERT(m_World != NULL); - m_World->MarkChunkDirty(GetChunkX(), GetChunkZ()); + if (m_World != NULL) + { + m_World->MarkChunkDirty(GetChunkX(), GetChunkZ()); + } } } ; // tolua_export -- cgit v1.2.3