summaryrefslogtreecommitdiffstats
path: root/src/Bindings/ManualBindings.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-04-27 17:00:37 +0200
committerMattes D <github@xoft.cz>2014-04-27 17:00:37 +0200
commita0f6149d0551c532896db2b920333718f68888d8 (patch)
tree27826e519c342e395e535190201a47e4a65e74e0 /src/Bindings/ManualBindings.cpp
parentMerge pull request #941 from archshift/master (diff)
parentFixed unitialized member in gZipFile (CID 43673) (diff)
downloadcuberite-a0f6149d0551c532896db2b920333718f68888d8.tar
cuberite-a0f6149d0551c532896db2b920333718f68888d8.tar.gz
cuberite-a0f6149d0551c532896db2b920333718f68888d8.tar.bz2
cuberite-a0f6149d0551c532896db2b920333718f68888d8.tar.lz
cuberite-a0f6149d0551c532896db2b920333718f68888d8.tar.xz
cuberite-a0f6149d0551c532896db2b920333718f68888d8.tar.zst
cuberite-a0f6149d0551c532896db2b920333718f68888d8.zip
Diffstat (limited to 'src/Bindings/ManualBindings.cpp')
-rw-r--r--src/Bindings/ManualBindings.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp
index 92b410481..b3f75aff1 100644
--- a/src/Bindings/ManualBindings.cpp
+++ b/src/Bindings/ManualBindings.cpp
@@ -1750,7 +1750,6 @@ static int tolua_cWorld_ChunkStay(lua_State * tolua_S)
{
return 0;
}
- cLuaChunkStay * ChunkStay = new cLuaChunkStay(*Plugin);
// Read the params:
cWorld * World = (cWorld *)tolua_tousertype(tolua_S, 1, NULL);
@@ -1760,8 +1759,12 @@ static int tolua_cWorld_ChunkStay(lua_State * tolua_S)
L.LogStackTrace();
return 0;
}
+
+ cLuaChunkStay * ChunkStay = new cLuaChunkStay(*Plugin);
+
if (!ChunkStay->AddChunks(2))
{
+ delete ChunkStay;
return 0;
}