Skip to content

Commit 54a70e9

Browse files
Fix crash when favoriting Live TV program while loading additional channels in the guide
1 parent 3c315be commit 54a70e9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/org/jellyfin/androidtv/ui/livetv/LiveTvGuideFragment.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,9 @@ private void load() {
235235

236236
public void refreshFavorite(UUID channelId){
237237
for (int i = 0; i < mChannels.getChildCount(); i++) {
238-
GuideChannelHeader gch = (GuideChannelHeader)mChannels.getChildAt(i);
238+
View child = mChannels.getChildAt(i);
239+
if (!(child instanceof GuideChannelHeader)) continue;
240+
GuideChannelHeader gch = (GuideChannelHeader) child;
239241
if (gch.getChannel().getId().equals(channelId.toString()))
240242
gch.refreshFavorite();
241243
}

0 commit comments

Comments
 (0)