summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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));