From 9580bd5ec07433de1a07022ab1dfed7d0a2dbcb4 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 24 Oct 2020 01:27:02 +0800 Subject: [PATCH] Failed to detect ecosystem of selected island, fix missing plants in palette, kaetemi/ryzomclassic#132 --- ryzom/common/data_common/r2/r2_ui_acts.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ryzom/common/data_common/r2/r2_ui_acts.lua b/ryzom/common/data_common/r2/r2_ui_acts.lua index 51b7675df..37edb9325 100644 --- a/ryzom/common/data_common/r2/r2_ui_acts.lua +++ b/ryzom/common/data_common/r2/r2_ui_acts.lua @@ -1240,9 +1240,11 @@ function r2.acts:updatePaletteFromEcosystem() -- search for ecosystem of current location local islandEcosystem for ecoName, v in pairs(self.islands) do - if self.islands[ecoName][self:getIslandNb(currentLocation.IslandName)].name==currentLocation.IslandName then - islandEcosystem = ecoName - break + if self.islands[ecoName][self:getIslandNb(currentLocation.IslandName)] then + if self.islands[ecoName][self:getIslandNb(currentLocation.IslandName)].name==currentLocation.IslandName then + islandEcosystem = ecoName + break + end end end