diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2014-06-15 20:08:26 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-16 11:56:01 +0100 |
commit | b99a8af33f6a349225efe489507c848f89d8fd13 (patch) | |
tree | fb39fd4b0906a070a5b77ea51f4bdbb1d008f781 | |
parent | b8b6e052db1b9545da9c31b6fde1229c09fae278 (diff) |
Resolve fdo#79913 by checking index bounds
Change-Id: I023a625d73724332245d612a61cb786acefc4cf2
Reviewed-on: https://gerrit.libreoffice.org/9791
Reviewed-by: Jean-Baptiste Faure <jbfaure@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 7eceffef49c9f498c5758d5e351c0f22126003e5)
-rw-r--r-- | svtools/source/control/toolbarmenu.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index d0f1e49ce9a0..2be0e430d8bb 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -397,7 +397,7 @@ void ToolbarMenu_Impl::notifyHighlightedEntry() if( pValueSet ) nChildIndex = static_cast< sal_Int32 >( pValueSet->GetItemPos( pValueSet->GetSelectItemId() ) ); - if( nChildIndex >= pEntry->getAccessibleChildCount() ) + if( (nChildIndex >= pEntry->getAccessibleChildCount()) || (nChildIndex < 0) ) return; aNew <<= getAccessibleChild( pEntry->mpControl, nChildIndex ); |