[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/source
Tomaž Vajngerl
tomaz.vajngerl at collabora.co.uk
Fri May 22 23:31:26 PDT 2015
vcl/source/window/toolbox.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit f7a40e1470431d8978d4ca96e7651af9b0609df3
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Wed May 20 20:11:24 2015 +0900
tdf#91404 check if the item position is valid
Change-Id: I963cf83d32bb976095274be913806de19bdf7a86
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 76051f8..09d5403 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2980,7 +2980,7 @@ void ToolBox::ImplDrawButton(vcl::RenderContext& rRenderContext, const Rectangle
void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint, bool bLayout)
{
- if( nPos >= mpData->m_aItems.size() )
+ if (nPos >= mpData->m_aItems.size())
return;
// execute pending paint requests
@@ -4055,8 +4055,11 @@ void ToolBox::Tracking( const TrackingEvent& rTEvt )
void ToolBox::InvalidateItem(sal_uInt16 nPosition)
{
- ImplToolItem* pItem = &mpData->m_aItems[nPosition];
- Invalidate(pItem->maRect);
+ if (nPosition < mpData->m_aItems.size())
+ {
+ ImplToolItem* pItem = &mpData->m_aItems[nPosition];
+ Invalidate(pItem->maRect);
+ }
}
void ToolBox::InvalidateMenuButton()
More information about the Libreoffice-commits
mailing list