diff options
author | Lukas Pioch <lukas@zgow.de> | 2019-08-11 00:32:22 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2019-08-11 00:32:22 +0200 |
commit | 528db6eea750636ebafd3d3405ba7966b01b37b2 (patch) | |
tree | bd390bf03e1d01eeae560a3d8cbcafa9c56e947c /src/Bindings/ManualBindings_World.cpp | |
parent | APIDocs: Added missing return type and corrected one (#4353) (diff) | |
download | cuberite-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 'src/Bindings/ManualBindings_World.cpp')
-rw-r--r-- | src/Bindings/ManualBindings_World.cpp | 5 |
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"); |