Skip to content
This repository
Browse code

[pvr] fix loop in CGUIWindowPVRChannels::SelectNextGroup

  • Loading branch information...
commit e9fea05f26d6115dee19e3b6caf37ddfc5f04f8d 1 parent ec8e34a
Lars Op den Kamp authored January 11, 2013 S. Davilla committed January 11, 2013
6  xbmc/pvr/windows/GUIWindowPVRChannels.cpp
@@ -181,7 +181,11 @@ CPVRChannelGroupPtr CGUIWindowPVRChannels::SelectNextGroup(void)
181 181
 {
182 182
   CPVRChannelGroupPtr currentGroup = SelectedGroup();
183 183
   CPVRChannelGroupPtr nextGroup = currentGroup->GetNextGroup();
184  
-  while (nextGroup && *nextGroup != *currentGroup && nextGroup->Size() == 0)
  184
+  while (nextGroup && nextGroup->Size() == 0 &&
  185
+      // break if the group matches
  186
+      *nextGroup != *currentGroup &&
  187
+      // or if we hit the first group
  188
+      !nextGroup->IsInternalGroup())
185 189
     nextGroup = nextGroup->GetNextGroup();
186 190
 
187 191
   /* always update so users can reset the list */

0 notes on commit e9fea05

Please sign in to comment.
Something went wrong with that request. Please try again.