aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Sommerfeld <kai.sommerfeld@gmx.com>2016-11-25 15:38:27 +0100
committerKai Sommerfeld <kai.sommerfeld@gmx.com>2016-11-25 19:40:38 +0100
commit365d492b3c1f2ec476db45334e32b40a6a9d7c9e (patch)
tree44ef2668050d22a155b29a25933c6727c5e63707
parentfb878be97afbe0ae157e3a288ba7196216b8679c (diff)
[PVR] Guide window: Fix grid model block count calculation for an edge case
-rw-r--r--xbmc/epg/GUIEPGGridContainerModel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/xbmc/epg/GUIEPGGridContainerModel.cpp b/xbmc/epg/GUIEPGGridContainerModel.cpp
index f2001fee9f..dbc867cdd1 100644
--- a/xbmc/epg/GUIEPGGridContainerModel.cpp
+++ b/xbmc/epg/GUIEPGGridContainerModel.cpp
@@ -155,6 +155,8 @@ void CGUIEPGGridContainerModel::Refresh(const std::unique_ptr<CFileItemList> &it
m_blocks = (gridDuration.GetDays() * 24 * 60 + gridDuration.GetHours() * 60 + gridDuration.GetMinutes()) / MINSPERBLOCK;
if (m_blocks >= MAXBLOCKS)
m_blocks = MAXBLOCKS;
+ else if (m_blocks < iBlocksPerPage)
+ m_blocks = iBlocksPerPage;
m_gridIndex.reserve(m_channelItems.size());
const std::vector<GridItem> blocks(m_blocks);