summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2014-10-03 18:59:19 +0200
committerSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2014-10-03 19:49:44 +0000
commit9a3ccbb69c9b4f2fb046d26d588fbe2521c99a52 (patch)
treea2357c5b48f5fc975ad7c08c26cbf9ffe8bedcb4 /svx
parent27ebfb10e9fba1af3bfee86973a349168bd041b1 (diff)
fdo#84620 : The styles drop down menu in Writer crashes LO.
Change-Id: I4fe52a1c9aabae1ad09dd94b75c3605dcb023d42 Reviewed-on: https://gerrit.libreoffice.org/11796 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 193d9ad11bf9..f9bcf188c3d5 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -557,7 +557,7 @@ void SvxStyleBox_Impl::UserDraw( const UserDrawEvent& rUDEvt )
{
Rectangle aRect(rUDEvt.GetRect());
unsigned int nId = (aRect.getY() / aRect.GetSize().Height());
- if(m_pButtons[nId])
+ if(nId < MAX_STYLES_ENTRIES && m_pButtons[nId])
m_pButtons[nId]->Hide();
// draw the non-style entries, ie. "Clear Formatting" or "More..."
DrawEntry( rUDEvt, true, true );