diff options
author | Tobias Arrskog <topfs2@xbmc.org> | 2014-11-24 07:53:38 +0100 |
---|---|---|
committer | Tobias Arrskog <topfs2@xbmc.org> | 2014-11-24 07:53:38 +0100 |
commit | 5fcce61bc3958a92722513e5810e28bed2833580 (patch) | |
tree | a5ac2df2930471cb50cbe28290cf872ea7210625 | |
parent | ec361caf76518be27687dcce11a76b7cc84c46f8 (diff) | |
parent | 69d7d7a046205e33743726ce02ca21fe5c34d223 (diff) |
Merge pull request #5792 from Montellese/skin_progressbar
infomanager: fix calls to GetInt() without a valid file item (same as in GetBool())
-rw-r--r-- | xbmc/GUIInfoManager.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index de3e2fec84..e56bcb8a3b 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -2074,7 +2074,16 @@ bool CGUIInfoManager::GetInt(int &value, int info, int contextWindow, const CGUI return GetMultiInfoInt(value, m_multiInfo[info - MULTI_INFO_START], contextWindow); if (info >= LISTITEM_START && info <= LISTITEM_END) + { + if (item == NULL) + { + CGUIWindow *window = GetWindowWithCondition(contextWindow, WINDOW_CONDITION_HAS_LIST_ITEMS); // true for has list items + if (window) + item = window->GetCurrentListItem().get(); + } + return GetItemInt(value, item, info); + } value = 0; switch( info ) |