LuaChunkStay: Fixed a crash on unused callback.
This commit is contained in:
parent
8c2a99711e
commit
803666d480
@ -130,8 +130,11 @@ void cLuaChunkStay::Enable(cChunkMap & a_ChunkMap, int a_OnChunkAvailableStackPo
|
|||||||
|
|
||||||
void cLuaChunkStay::OnChunkAvailable(int a_ChunkX, int a_ChunkZ)
|
void cLuaChunkStay::OnChunkAvailable(int a_ChunkX, int a_ChunkZ)
|
||||||
{
|
{
|
||||||
cPluginLua::cOperation Op(m_Plugin);
|
if (m_OnChunkAvailable.IsValid())
|
||||||
Op().Call((int)m_OnChunkAvailable, a_ChunkX, a_ChunkZ);
|
{
|
||||||
|
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)
|
bool cLuaChunkStay::OnAllChunksAvailable(void)
|
||||||
{
|
{
|
||||||
|
if (m_OnAllChunksAvailable.IsValid())
|
||||||
{
|
{
|
||||||
// Call the callback:
|
// Call the callback:
|
||||||
cPluginLua::cOperation Op(m_Plugin);
|
cPluginLua::cOperation Op(m_Plugin);
|
||||||
|
Loading…
Reference in New Issue
Block a user