diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-02 16:40:21 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-07-08 12:04:11 +0200 |
commit | 9632b20180ff17c2a0d04f85813bf1613a35f94d (patch) | |
tree | 02424c1ab070bd589c9dfba57fe07bdc66446be8 /sc | |
parent | 9a27cd31cc8d8cf0b524cf3a3af55f51b1c1e21c (diff) |
fix a11y crash seen on moving chart wizard dialog
Change-Id: Ic3ba292e28fe12d7dcc2c2e67aeea48a4c8aaac2
(cherry picked from commit b161552bd9f7d6b6de9752e4f0e7d6f65bbcf42e)
(cherry picked from commit ea228fdffd17b87e398216625213a691fcb34825)
Reviewed-on: https://gerrit.libreoffice.org/16714
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleDocument.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index ea2688eb196d..b2ff3253cde8 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -813,8 +813,9 @@ uno::Reference< XAccessible > ScChildrenShapes::GetSelected(sal_Int32 nSelectedC std::vector < uno::Reference < drawing::XShape > > aShapes; FillShapes(aShapes); - if(aShapes.size()<=0) + if (nSelectedChildIndex < 0 || static_cast<size_t>(nSelectedChildIndex) >= aShapes.size()) return xAccessible; + SortedShapes::iterator aItr; if (FindShape(aShapes[nSelectedChildIndex], aItr)) xAccessible = Get(aItr - maZOrderedShapes.begin()); |