From 86a0043e41b450d72a22fade65701ca65264bc37 Mon Sep 17 00:00:00 2001 From: Alexander Weber Date: Thu, 2 Mar 2017 22:01:42 +0100 Subject: [PATCH] creative bugfix (rare crash) --- creative.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/creative.lua b/creative.lua index 9fba60c..6a12df9 100644 --- a/creative.lua +++ b/creative.lua @@ -37,7 +37,9 @@ local function update_group_selection(state, changed_group) end local sel_id = groups_sel1:getSelected() - if state.param.creative_group_list1[sel_id] == "all" or not state.param.creative_group_list1[sel_id] then + if state.param.creative_group_list1[sel_id] == "all" + or not state.param.creative_group_list1[sel_id] + or not grouped[state.param.creative_group_list1[sel_id]] then outlist = grouped["all"].items groups_sel2:clearItems() groups_sel3:clearItems() @@ -50,7 +52,9 @@ local function update_group_selection(state, changed_group) end sel_id = groups_sel2:getSelected() - if state.param.creative_group_list2[sel_id] == "all" or not state.param.creative_group_list2[sel_id] then + if state.param.creative_group_list2[sel_id] == "all" + or not state.param.creative_group_list2[sel_id] + or not grouped[state.param.creative_group_list2[sel_id]] then outlist = grouped["all"].items groups_sel3:clearItems() else