Fix to crash
This commit is contained in:
parent
b4dc073265
commit
fb071641ae
|
@ -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,16 @@ end sub
|
|||
|
||||
sub onProgramFocused()
|
||||
m.top.watchChannel = invalid
|
||||
channel = m.scheduleGrid.content.GetChild(m.scheduleGrid.programFocusedDetails.focusChannelIndex)
|
||||
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