[Libreoffice-commits] core.git: sc/source
Caolán McNamara
caolanm at redhat.com
Thu Jul 2 08:48:54 PDT 2015
sc/source/ui/Accessibility/AccessibleDocument.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit b161552bd9f7d6b6de9752e4f0e7d6f65bbcf42e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jul 2 16:40:21 2015 +0100
fix a11y crash seen on moving chart wizard dialog
Change-Id: Ic3ba292e28fe12d7dcc2c2e67aeea48a4c8aaac2
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 02c1b24..39e0e44 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());
More information about the Libreoffice-commits
mailing list