aboutsummaryrefslogtreecommitdiff
path: root/guilib
diff options
context:
space:
mode:
authorjmarshallnz <jmarshallnz@svn>2010-04-26 10:15:44 +0000
committerjmarshallnz <jmarshallnz@svn>2010-04-26 10:15:44 +0000
commit7fda91b5aa3bb9f1989f7f9281acf85a02a42a24 (patch)
tree504414ace2d60eeb8be55991ec0f51ca2765ac23 /guilib
parenta594abe6278480bf657b5dabef468011a9bc6918 (diff)
fixed: infinite loop if height or width isn't set in itemlayouts
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@29506 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib')
-rw-r--r--guilib/GUIListItemLayout.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/guilib/GUIListItemLayout.cpp b/guilib/GUIListItemLayout.cpp
index 1a5324a76e..85df6f6e7a 100644
--- a/guilib/GUIListItemLayout.cpp
+++ b/guilib/GUIListItemLayout.cpp
@@ -159,6 +159,9 @@ void CGUIListItemLayout::LoadLayout(TiXmlElement *layout, bool focused)
LoadControl(child, &m_group);
child = child->NextSiblingElement("control");
}
+ // ensure width and height are valid
+ m_width = std::max(1.0f, m_width);
+ m_height = std::max(1.0f, m_height);
}
//#ifdef PRE_SKIN_VERSION_9_10_COMPATIBILITY