diff options
author | madmaxoft <github@xoft.cz> | 2014-10-06 13:48:44 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-10-06 13:48:44 +0200 |
commit | 4e82a580602226e37aae0b1c361e71e4ce47ef52 (patch) | |
tree | 74eb0d689ab8e59e156ad3d5ebc2534f5c9af11a /src/Bindings/ManualBindings.cpp | |
parent | Merge pull request #1509 from WebFreak001/master (diff) | |
download | cuberite-4e82a580602226e37aae0b1c361e71e4ce47ef52.tar cuberite-4e82a580602226e37aae0b1c361e71e4ce47ef52.tar.gz cuberite-4e82a580602226e37aae0b1c361e71e4ce47ef52.tar.bz2 cuberite-4e82a580602226e37aae0b1c361e71e4ce47ef52.tar.lz cuberite-4e82a580602226e37aae0b1c361e71e4ce47ef52.tar.xz cuberite-4e82a580602226e37aae0b1c361e71e4ce47ef52.tar.zst cuberite-4e82a580602226e37aae0b1c361e71e4ce47ef52.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/ManualBindings.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp index f4764447c..f643f06ec 100644 --- a/src/Bindings/ManualBindings.cpp +++ b/src/Bindings/ManualBindings.cpp @@ -697,8 +697,12 @@ static int tolua_ForEachInBox(lua_State * tolua_S) Ty1 * Self = NULL; cBoundingBox * Box = NULL; L.GetStackValues(1, Self, Box); - ASSERT(Self != NULL); // We have verified the type at the top, so we should get valid objects here - ASSERT(Box != NULL); + if ((Self == NULL) || (Box == NULL)) + { + LOGWARNING("Invalid world (%p) or boundingbox (%p)", Self, Box); + L.LogStackTrace(); + return 0; + } // Create a reference for the function: cLuaState::cRef FnRef(L, 3); |