Skip to content

Commit

Permalink
fix(gearhandler): was crashing without a config setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Torwent committed Jul 31, 2024
1 parent 291b6ab commit 52ac70f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions optional/handlers/gearhandler.simba
Original file line number Diff line number Diff line change
Expand Up @@ -456,15 +456,15 @@ begin
begin
combobox := parent.GetChild(ToStr(slot).Lower() + '_slot_combobox');

if GearHandler._FormFiltered then
Self._RefreshList(combobox);

if gear.Items[slot] = '' then
if VarIsEmpty(gear.Items[slot]) then
begin
item := 'None';
gear.Items[slot] := item;
end;

if GearHandler._FormFiltered then
Self._RefreshList(combobox);

combobox.setItemIndex(combobox.getItems().IndexOf(gear.Items[slot]));
Self._OnGearChange(combobox);
end;
Expand Down Expand Up @@ -821,7 +821,6 @@ begin
setOnClick(@Self._ClearGearFilter);
end;


Self._RefreshSets(Result);
cb.SetItemIndex(0);
Self._OnSelectorChange(cb.ComboBox);
Expand Down

0 comments on commit 52ac70f

Please sign in to comment.