From fbfc14f6608e5d28acd81a03ecb1dea40445ec90 Mon Sep 17 00:00:00 2001 From: GreenXenith <24834740+GreenXenith@users.noreply.github.com> Date: Tue, 27 Nov 2018 10:44:55 -0800 Subject: [PATCH] Code cleanup --- lcd.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lcd.lua b/lcd.lua index c071df1..c78bdcd 100644 --- a/lcd.lua +++ b/lcd.lua @@ -168,8 +168,9 @@ local spawn_entity = function(pos) end local prepare_writing = function(pos) - if get_entity(pos) then - set_texture(get_entity(pos)) + local entity = get_entity(pos) + if entity then + set_texture(entity) end end