aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2017-09-15 12:19:01 +0200
committerSmallJoker <mk939@ymail.com>2018-06-03 17:31:59 +0200
commitc2a0333901a696f7dcb67356aeb0206b89be14e6 (patch)
tree11d378e7426f53797e94e6f0d103164ffe1356cf /src/script/cpp_api
parent5b2461c713889b9832f5b99c85abf87e5d494242 (diff)
downloadminetest-c2a0333901a696f7dcb67356aeb0206b89be14e6.tar.gz
minetest-c2a0333901a696f7dcb67356aeb0206b89be14e6.tar.bz2
minetest-c2a0333901a696f7dcb67356aeb0206b89be14e6.zip
ServerEnv: Clean up object lifecycle handling (#6414)
* ServerEnv: Clean up object lifecycle handling
Diffstat (limited to 'src/script/cpp_api')
-rw-r--r--src/script/cpp_api/s_base.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_base.cpp b/src/script/cpp_api/s_base.cpp
index 4d7461c5b..2537d895f 100644
--- a/src/script/cpp_api/s_base.cpp
+++ b/src/script/cpp_api/s_base.cpp
@@ -322,6 +322,10 @@ void ScriptApiBase::objectrefGetOrCreate(lua_State *L,
ObjectRef::create(L, cobj);
} else {
push_objectRef(L, cobj->getId());
+ if (cobj->isGone())
+ warningstream << "ScriptApiBase::objectrefGetOrCreate(): "
+ << "Pushing ObjectRef to removed/deactivated object"
+ << ", this is probably a bug." << std::endl;
}
}