summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Bindings/ManualBindings_World.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Bindings/ManualBindings_World.cpp b/src/Bindings/ManualBindings_World.cpp
index a6f6e84a9..ee0998f87 100644
--- a/src/Bindings/ManualBindings_World.cpp
+++ b/src/Bindings/ManualBindings_World.cpp
@@ -487,6 +487,11 @@ static int tolua_cWorld_DoWithNearestPlayer(lua_State * tolua_S)
bool CheckLineOfSight = true, IgnoreSpectators = true; // Defaults for the optional params
L.GetStackValues(1, Self, Position, RangeLimit, FnRef, CheckLineOfSight, IgnoreSpectators);
+ if (Position == nullptr)
+ {
+ return L.ApiParamError("Expected a non-nil Vector3d for parameter #2");
+ }
+
if (!FnRef.IsValid())
{
return L.ApiParamError("Expected a valid callback function for parameter #3");