From 69d7d7a046205e33743726ce02ca21fe5c34d223 Mon Sep 17 00:00:00 2001 From: montellese Date: Sun, 23 Nov 2014 17:37:36 +0100 Subject: infomanager: fix calls to GetInt() without a valid file item (same as in GetBool()) --- xbmc/GUIInfoManager.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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 ) -- cgit v1.2.3