summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMark Asp <markrules2@gmail.com>2019-07-28 15:09:51 +0200
committerpeterbell10 <peterbell10@live.co.uk>2019-07-28 15:09:51 +0200
commitc00b3656178b23a69347c9cb3a2d742429209b6d (patch)
treeda565ba86f2a337e3b074e8f9c704a86c460ab97 /src
parentIgnore whitespace only lines in brewing and furnace recipes (#4332) (diff)
downloadcuberite-c00b3656178b23a69347c9cb3a2d742429209b6d.tar
cuberite-c00b3656178b23a69347c9cb3a2d742429209b6d.tar.gz
cuberite-c00b3656178b23a69347c9cb3a2d742429209b6d.tar.bz2
cuberite-c00b3656178b23a69347c9cb3a2d742429209b6d.tar.lz
cuberite-c00b3656178b23a69347c9cb3a2d742429209b6d.tar.xz
cuberite-c00b3656178b23a69347c9cb3a2d742429209b6d.tar.zst
cuberite-c00b3656178b23a69347c9cb3a2d742429209b6d.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/ManualBindings_World.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Bindings/ManualBindings_World.cpp b/src/Bindings/ManualBindings_World.cpp
index c6716cf91..a6f6e84a9 100644
--- a/src/Bindings/ManualBindings_World.cpp
+++ b/src/Bindings/ManualBindings_World.cpp
@@ -890,7 +890,7 @@ static int tolua_cWorld_SpawnSplitExperienceOrbs(lua_State* tolua_S)
}
cWorld * self = nullptr;
- Vector3d * Position;
+ Vector3d * Position = nullptr;
int Reward;
L.GetStackValues(1, self, Position, Reward);
if (self == nullptr)
@@ -898,6 +898,11 @@ static int tolua_cWorld_SpawnSplitExperienceOrbs(lua_State* tolua_S)
tolua_error(tolua_S, "Invalid 'self' in function 'SpawnSplitExperienceOrbs'", nullptr);
return 0;
}
+ if (Position == nullptr)
+ {
+ tolua_error(tolua_S, "Error in function 'SpawnSplitExperienceOrbs' arg #2. Value must not be nil.", nullptr);
+ return 0;
+ }
// Execute and push result:
L.Push(self->SpawnExperienceOrb(Position->x, Position->y, Position->z, Reward));