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
sub onFilterFocusChange()
if isFilterMenuDataValid() = false
hideChecklist()
return
end if
if m.filterMenu.content.getChild(m.filterMenu.itemFocused).getChildCount() > 0
showChecklist()
else
@ -67,6 +72,18 @@ sub onFilterFocusChange()
end if
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()
' Views Tab