summaryrefslogtreecommitdiffstats
path: root/src/Bindings/ManualBindings.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-10-06 13:48:44 +0200
committermadmaxoft <github@xoft.cz>2014-10-06 13:48:44 +0200
commit4e82a580602226e37aae0b1c361e71e4ce47ef52 (patch)
tree74eb0d689ab8e59e156ad3d5ebc2534f5c9af11a /src/Bindings/ManualBindings.cpp
parentMerge pull request #1509 from WebFreak001/master (diff)
downloadcuberite-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 'src/Bindings/ManualBindings.cpp')
-rw-r--r--src/Bindings/ManualBindings.cpp8
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);