Merge pull request #751 from jimdogx/fix/jf-crash-live-tv-no-favorites
Fix to crash
This commit is contained in:
commit
38e2a21c71
|
@ -80,6 +80,11 @@ end sub
|
|||
' When LoadScheduleTask completes (initial or more data) and we have a schedule to display
|
||||
sub onScheduleLoaded()
|
||||
|
||||
' make sure we actually have a schedule (i.e. filter by favorites, but no channels have been favorited)
|
||||
if m.scheduleGrid.content.GetChildCount() <= 0
|
||||
return
|
||||
end if
|
||||
|
||||
for each item in m.LoadScheduleTask.schedule
|
||||
|
||||
channel = m.scheduleGrid.content.GetChild(m.channelIndex[item.ChannelId])
|
||||
|
@ -101,12 +106,19 @@ end sub
|
|||
|
||||
sub onProgramFocused()
|
||||
m.top.watchChannel = invalid
|
||||
channel = m.scheduleGrid.content.GetChild(m.scheduleGrid.programFocusedDetails.focusChannelIndex)
|
||||
|
||||
' Make sure we have channels (i.e. filter set to favorite yet there are none)
|
||||
if m.scheduleGrid.content.getChildCount() <= 0
|
||||
channel = invalid
|
||||
else
|
||||
channel = m.scheduleGrid.content.GetChild(m.scheduleGrid.programFocusedDetails.focusChannelIndex)
|
||||
end if
|
||||
|
||||
m.detailsPane.channel = channel
|
||||
m.top.focusedChannel = channel
|
||||
|
||||
' Exit if Channels not yet loaded
|
||||
if channel.getChildCount() = 0
|
||||
if channel = invalid or channel.getChildCount() = 0
|
||||
m.detailsPane.programDetails = invalid
|
||||
return
|
||||
end if
|
||||
|
|
Loading…
Reference in New Issue
Block a user