summaryrefslogtreecommitdiffstats
path: root/src/Bindings/ManualBindings.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-10-06 17:38:42 +0200
committerHowaner <franzi.moos@googlemail.com>2014-10-06 17:38:42 +0200
commita59f2d15fbaa934f517d9bb5fbe4737078188f9d (patch)
tree3e54201e4cffb6b9675eb6a1584925b911f924f8 /src/Bindings/ManualBindings.cpp
parentBetter StreamNextChunk() method (diff)
parentFixed crash in ForEachEntityInBox API. (diff)
downloadcuberite-a59f2d15fbaa934f517d9bb5fbe4737078188f9d.tar
cuberite-a59f2d15fbaa934f517d9bb5fbe4737078188f9d.tar.gz
cuberite-a59f2d15fbaa934f517d9bb5fbe4737078188f9d.tar.bz2
cuberite-a59f2d15fbaa934f517d9bb5fbe4737078188f9d.tar.lz
cuberite-a59f2d15fbaa934f517d9bb5fbe4737078188f9d.tar.xz
cuberite-a59f2d15fbaa934f517d9bb5fbe4737078188f9d.tar.zst
cuberite-a59f2d15fbaa934f517d9bb5fbe4737078188f9d.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);