[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sc/source
Caolán McNamara
caolanm at redhat.com
Thu Jul 2 08:49:30 PDT 2015
sc/source/ui/Accessibility/AccessibleDocument.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit ea228fdffd17b87e398216625213a691fcb34825
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
(cherry picked from commit b161552bd9f7d6b6de9752e4f0e7d6f65bbcf42e)
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index a4e94cc..4cec468 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