Ensure vars are valid before using - fixes 1.6.4 crash log line 56

This commit is contained in:
Charles Ewert 2023-04-20 12:01:52 -04:00
parent 5f17467d62
commit ebf2e4e1af

View File

@ -53,6 +53,11 @@ sub hideChecklist()
end sub end sub
sub onFilterFocusChange() sub onFilterFocusChange()
if isFilterMenuDataValid() = false
hideChecklist()
return
end if
if m.filterMenu.content.getChild(m.filterMenu.itemFocused).getChildCount() > 0 if m.filterMenu.content.getChild(m.filterMenu.itemFocused).getChildCount() > 0
showChecklist() showChecklist()
else else
@ -67,6 +72,18 @@ sub onFilterFocusChange()
end if end if
end sub end sub
' Ensure all data for Filter Menu is valid
function isFilterMenuDataValid() as boolean
if not isValid(m.filterMenu) or not isValid(m.filterMenu.content) or not isValid(m.filterMenu.itemFocused)
return false
end if
if not isValid(m.filterMenu.content.getChild(m.filterMenu.itemFocused))
return false
end if
return true
end function
sub optionsSet() sub optionsSet()
' Views Tab ' Views Tab