Ticket #9101: 89_mythvideo_right_arrow_fix.patch

File 89_mythvideo_right_arrow_fix.patch, 858 bytes (added by mlord@…, 15 years ago)

Patch to fix RIGHT-arrow crash on entry to mythvideo.

  • mythtv/libs/libmythui/mythuibuttontree.cpp

    old new  
    457457    bool doUpdate = false;
    458458    if (right)
    459459    {
    460         if ((m_activeListID < m_visibleLists - 1) &&
    461             (m_activeListID < (uint)m_buttonlists.count() - 1))
     460        /*
     461         * Be careful to guard against comparing negatives with uint values here.
     462         * First time in with RIGHT arrow in mythvideo gives these values:
     463         *      m_activeListID=-1 m_visibleLists=3 m_buttonlists.count()=3
     464         */
     465        if ((m_activeListID + 1 < m_visibleLists) &&
     466            (m_activeListID + 1 < (uint)m_buttonlists.count()))
    462467            m_activeListID++;
    463468        else if (m_currentNode && m_currentNode->visibleChildCount() > 0)
    464469        {