[vlc-commits] skins2: add a needed boundary check (playtree control)
Erwan Tulou
git at videolan.org
Mon Apr 8 11:56:24 CEST 2013
vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Mon Apr 8 11:48:06 2013 +0200| [64b55f142b9617d7ae79a2966a101e18e8f6be09] | committer: Erwan Tulou
skins2: add a needed boundary check (playtree control)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=64b55f142b9617d7ae79a2966a101e18e8f6be09
---
modules/gui/skins2/controls/ctrl_tree.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/modules/gui/skins2/controls/ctrl_tree.cpp b/modules/gui/skins2/controls/ctrl_tree.cpp
index dc825ff..426587c 100644
--- a/modules/gui/skins2/controls/ctrl_tree.cpp
+++ b/modules/gui/skins2/controls/ctrl_tree.cpp
@@ -665,7 +665,13 @@ void CtrlTree::makeImage()
__MIN( m_pCurBitmap->getHeight(),
height - yPos2), true );
}
- yPos += i_itemHeight - pText->getHeight();
+ yPos += (i_itemHeight - pText->getHeight());
+ if( yPos >= height )
+ {
+ delete pText;
+ break;
+ }
+
int ySrc = 0;
if( yPos < 0 )
{
More information about the vlc-commits
mailing list