Kaydet (Commit) f7a40e14 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

tdf#91404 check if the item position is valid

Change-Id: I963cf83d32bb976095274be913806de19bdf7a86
üst 7f49a466
...@@ -2980,7 +2980,7 @@ void ToolBox::ImplDrawButton(vcl::RenderContext& rRenderContext, const Rectangle ...@@ -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) 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; return;
// execute pending paint requests // execute pending paint requests
...@@ -4055,8 +4055,11 @@ void ToolBox::Tracking( const TrackingEvent& rTEvt ) ...@@ -4055,8 +4055,11 @@ void ToolBox::Tracking( const TrackingEvent& rTEvt )
void ToolBox::InvalidateItem(sal_uInt16 nPosition) void ToolBox::InvalidateItem(sal_uInt16 nPosition)
{ {
ImplToolItem* pItem = &mpData->m_aItems[nPosition]; if (nPosition < mpData->m_aItems.size())
Invalidate(pItem->maRect); {
ImplToolItem* pItem = &mpData->m_aItems[nPosition];
Invalidate(pItem->maRect);
}
} }
void ToolBox::InvalidateMenuButton() void ToolBox::InvalidateMenuButton()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment