aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Yves Rollo <dev@pyrollo.com>2018-12-02 15:22:37 +0100
committerPierre-Yves Rollo <dev@pyrollo.com>2018-12-02 15:22:37 +0100
commitb88f67f01512f878486eb34b9160aeb2ba9794ac (patch)
tree280d8b54071491297ff2663873ada693503a6548
parentbcc181cb154b614007e595b1b991ab218534cdce (diff)
downloaddisplay_modpack-b88f67f01512f878486eb34b9160aeb2ba9794ac.tar.gz
display_modpack-b88f67f01512f878486eb34b9160aeb2ba9794ac.tar.bz2
display_modpack-b88f67f01512f878486eb34b9160aeb2ba9794ac.zip
Avoid crash if entity not defined.
-rw-r--r--display_api/init.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/display_api/init.lua b/display_api/init.lua
index 4c0be22..bf95ded 100644
--- a/display_api/init.lua
+++ b/display_api/init.lua
@@ -117,6 +117,10 @@ end
--- Entity update
function update_entity(entity)
+ if not entity then
+ return
+ end
+
if not entity.nodepos then
entity.object:remove() -- Remove old/buggy entity
return