Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[pvr] fix loop in CGUIWindowPVRChannels::SelectNextGroup

  • Loading branch information...
commit d7fe56c78356b91d2115e464eeb570df6519a58e 1 parent 923014c
Lars Op den Kamp opdenkamp authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 xbmc/pvr/windows/GUIWindowPVRChannels.cpp
6 xbmc/pvr/windows/GUIWindowPVRChannels.cpp
View
@@ -181,7 +181,11 @@ CPVRChannelGroupPtr CGUIWindowPVRChannels::SelectNextGroup(void)
{
CPVRChannelGroupPtr currentGroup = SelectedGroup();
CPVRChannelGroupPtr nextGroup = currentGroup->GetNextGroup();
- while (nextGroup && *nextGroup != *currentGroup && nextGroup->Size() == 0)
+ while (nextGroup && nextGroup->Size() == 0 &&
+ // break if the group matches
+ *nextGroup != *currentGroup &&
+ // or if we hit the first group
+ !nextGroup->IsInternalGroup())
nextGroup = nextGroup->GetNextGroup();
/* always update so users can reset the list */
Please sign in to comment.
Something went wrong with that request. Please try again.