From ee46d1a7d3f3389f7bf3546b85f2bf3b3e6b1277 Mon Sep 17 00:00:00 2001 From: Serhiy Zahoriya Date: Tue, 24 Dec 2019 06:01:02 +0200 Subject: [PATCH] Workaround crash on clock rotation --- display_api/display.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/display_api/display.lua b/display_api/display.lua index 2fed40f..dd0b3fc 100644 --- a/display_api/display.lua +++ b/display_api/display.lua @@ -114,6 +114,9 @@ local function get_orientation_values(node) if ndef then local paramtype2 = ndef.paramtype2 if paramtype2 == "wallmounted" or paramtype2 == "colorwallmounted" then + if (wallmounted_values[node.param2 % 8] == nil) then + return facedir_values[0] + end return wallmounted_values[node.param2 % 8] elseif paramtype2 == "facedir" or paramtype2 == "colorfacedir" then return facedir_values[node.param2 % 32]