aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2017-09-15 12:19:01 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-09-15 12:19:01 +0200
commit04839f233f37faa9af406ea66fc6c199127781eb (patch)
treed243fcae7f57fe4cf22046f42cda5424a1561e4c /src/script/cpp_api
parentedbc533414b0ba991a82f8003d90924e1dc60d95 (diff)
downloadminetest-04839f233f37faa9af406ea66fc6c199127781eb.tar.gz
minetest-04839f233f37faa9af406ea66fc6c199127781eb.tar.bz2
minetest-04839f233f37faa9af406ea66fc6c199127781eb.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 32a99826e..c0d9a4f10 100644
--- a/src/script/cpp_api/s_base.cpp
+++ b/src/script/cpp_api/s_base.cpp
@@ -343,6 +343,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;
}
}