diff options
author | Mattes D <github@xoft.cz> | 2014-10-17 13:17:56 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-10-17 13:17:56 +0200 |
commit | 803666d480317376cf8f6e964ef4996567dea59f (patch) | |
tree | cef84c4b98ddf9bbb449f17d5177ca450163fe05 /src | |
parent | Merged branch 'fix_chunks'. (diff) | |
download | cuberite-803666d480317376cf8f6e964ef4996567dea59f.tar cuberite-803666d480317376cf8f6e964ef4996567dea59f.tar.gz cuberite-803666d480317376cf8f6e964ef4996567dea59f.tar.bz2 cuberite-803666d480317376cf8f6e964ef4996567dea59f.tar.lz cuberite-803666d480317376cf8f6e964ef4996567dea59f.tar.xz cuberite-803666d480317376cf8f6e964ef4996567dea59f.tar.zst cuberite-803666d480317376cf8f6e964ef4996567dea59f.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/Bindings/LuaChunkStay.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Bindings/LuaChunkStay.cpp b/src/Bindings/LuaChunkStay.cpp index a3d3a8090..23da12f68 100644 --- a/src/Bindings/LuaChunkStay.cpp +++ b/src/Bindings/LuaChunkStay.cpp @@ -130,8 +130,11 @@ void cLuaChunkStay::Enable(cChunkMap & a_ChunkMap, int a_OnChunkAvailableStackPo void cLuaChunkStay::OnChunkAvailable(int a_ChunkX, int a_ChunkZ) { - cPluginLua::cOperation Op(m_Plugin); - Op().Call((int)m_OnChunkAvailable, a_ChunkX, a_ChunkZ); + if (m_OnChunkAvailable.IsValid()) + { + cPluginLua::cOperation Op(m_Plugin); + Op().Call((int)m_OnChunkAvailable, a_ChunkX, a_ChunkZ); + } } @@ -140,6 +143,7 @@ void cLuaChunkStay::OnChunkAvailable(int a_ChunkX, int a_ChunkZ) bool cLuaChunkStay::OnAllChunksAvailable(void) { + if (m_OnAllChunksAvailable.IsValid()) { // Call the callback: cPluginLua::cOperation Op(m_Plugin); |