Skip to content

Commit

Permalink
Prevent running off end of list in video selection window.
Browse files Browse the repository at this point in the history
Fixes #349.
  • Loading branch information
linuxdude42 committed Mar 31, 2021
1 parent 99c3ec2 commit 91b2f0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythscreentype.cpp
Expand Up @@ -164,10 +164,10 @@ bool MythScreenType::NextPrevWidgetFocus(bool up)
m_currentFocusWidget);
if (up)
{
if (it != m_focusWidgetList.end())
it++;
if (it == m_focusWidgetList.end())
it = m_focusWidgetList.begin();
else
it++;
// Put an upper limit on loops to guarantee exit at some point.
for (auto count = m_focusWidgetList.size() * 2; count > 0; count--)
{
Expand Down

0 comments on commit 91b2f0b

Please sign in to comment.