summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/BeaconEntity.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2017-08-10 19:11:27 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2017-08-18 12:22:22 +0200
commit5e81024f890fcbee0f0959655e9ad7806fd9f956 (patch)
treefd1f2941d987306a70fcf4c7986d057d7031bb4b /src/BlockEntities/BeaconEntity.cpp
parentAdd link to knowledge base. (diff)
downloadcuberite-5e81024f890fcbee0f0959655e9ad7806fd9f956.tar
cuberite-5e81024f890fcbee0f0959655e9ad7806fd9f956.tar.gz
cuberite-5e81024f890fcbee0f0959655e9ad7806fd9f956.tar.bz2
cuberite-5e81024f890fcbee0f0959655e9ad7806fd9f956.tar.lz
cuberite-5e81024f890fcbee0f0959655e9ad7806fd9f956.tar.xz
cuberite-5e81024f890fcbee0f0959655e9ad7806fd9f956.tar.zst
cuberite-5e81024f890fcbee0f0959655e9ad7806fd9f956.zip
Diffstat (limited to 'src/BlockEntities/BeaconEntity.cpp')
-rw-r--r--src/BlockEntities/BeaconEntity.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/BlockEntities/BeaconEntity.cpp b/src/BlockEntities/BeaconEntity.cpp
index 24de9e25c..a772290dd 100644
--- a/src/BlockEntities/BeaconEntity.cpp
+++ b/src/BlockEntities/BeaconEntity.cpp
@@ -19,7 +19,10 @@ cBeaconEntity::cBeaconEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, int
m_SecondaryEffect(cEntityEffect::effNoEffect)
{
ASSERT(a_BlockType == E_BLOCK_BEACON);
- UpdateBeacon();
+ if (m_World != nullptr)
+ {
+ UpdateBeacon();
+ }
}