From 81c9c8cdfe69322c4eb35edc6853e9be89cb7ba5 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Tue, 20 Mar 2018 00:55:17 -0500 Subject: [PATCH] Avoid crashing labormanager if map square on lowest level is designated+hidden (#1240) --- plugins/labormanager/labormanager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/labormanager/labormanager.cpp b/plugins/labormanager/labormanager.cpp index 5d6c5c971..3ef1808a2 100644 --- a/plugins/labormanager/labormanager.cpp +++ b/plugins/labormanager/labormanager.cpp @@ -1075,8 +1075,7 @@ private: if (bl->designation[x][y].bits.hidden) { df::coord p = bl->map_pos; - df::coord c(p.x, p.y, p.z - 1); - if (Maps::getTileDesignation(c)->bits.hidden) + if (! Maps::isTileVisible(p.x, p.y, p.z-1)) continue; }