summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2019-08-11 00:32:22 +0200
committerMattes D <github@xoft.cz>2019-08-11 00:32:22 +0200
commit528db6eea750636ebafd3d3405ba7966b01b37b2 (patch)
treebd390bf03e1d01eeae560a3d8cbcafa9c56e947c /src/Bindings
parentAPIDocs: Added missing return type and corrected one (#4353) (diff)
downloadcuberite-528db6eea750636ebafd3d3405ba7966b01b37b2.tar
cuberite-528db6eea750636ebafd3d3405ba7966b01b37b2.tar.gz
cuberite-528db6eea750636ebafd3d3405ba7966b01b37b2.tar.bz2
cuberite-528db6eea750636ebafd3d3405ba7966b01b37b2.tar.lz
cuberite-528db6eea750636ebafd3d3405ba7966b01b37b2.tar.xz
cuberite-528db6eea750636ebafd3d3405ba7966b01b37b2.tar.zst
cuberite-528db6eea750636ebafd3d3405ba7966b01b37b2.zip
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");