diff options
author | Sam Stenvall <neggelandia@gmail.com> | 2014-12-30 22:11:24 +0200 |
---|---|---|
committer | Sam Stenvall <neggelandia@gmail.com> | 2014-12-30 22:11:24 +0200 |
commit | 48a3b47a0fdae1fd6ee308e7e634bf4cd22a51e1 (patch) | |
tree | e56a05d54bd5322d60435be071e036d87c7f8319 | |
parent | e8b707af7f4a1f2564c4d9f4cb857c7da0fa9066 (diff) |
[gui] correct the logic for checking whether we have a sort method
or not
Without this, if you go to Live TV -> Guide and change view mode, Kodi
will crash and will continue to crash on startup for all eternity
-rw-r--r-- | xbmc/view/GUIViewState.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xbmc/view/GUIViewState.cpp b/xbmc/view/GUIViewState.cpp index d8f30a7e8d..78378dd92e 100644 --- a/xbmc/view/GUIViewState.cpp +++ b/xbmc/view/GUIViewState.cpp @@ -472,7 +472,7 @@ void CGUIViewState::SetSortOrder(SortOrder sortOrder) if (sortOrder == SortOrderNone) return; - if (m_currentSortMethod < 0 && m_currentSortMethod >= (int)m_sortMethods.size()) + if (m_currentSortMethod < 0 || m_currentSortMethod >= (int)m_sortMethods.size()) return; m_sortMethods[m_currentSortMethod].m_sortDescription.sortOrder = sortOrder; |