summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-05-05 23:33:00 +0200
committerMichael Stahl <mstahl@redhat.com>2014-05-05 23:54:23 +0200
commitd09d75167d77adcc8538c5cc5d8fe6bac6091ca1 (patch)
tree92d355c0e511974f0b0fc2f4e79a44b1673a6bad /vcl/unx
parentf66d9badf9e510f5bbc94201edd5a53c26f8526a (diff)
AtkListener: consistency check is too strict
Apparently it can happen in JunitTest_sw_unoapi that between the getAccessibleChildCount() and the getAccessibleChild() calls that the children all disappear; try not to assert in that case. Change-Id: Iec8e373281950bf684fa76d69f8c4625ecd1255a
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk/a11y/atklistener.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/unx/gtk/a11y/atklistener.cxx b/vcl/unx/gtk/a11y/atklistener.cxx
index 3349be84925f..511ff0ab0f42 100644
--- a/vcl/unx/gtk/a11y/atklistener.cxx
+++ b/vcl/unx/gtk/a11y/atklistener.cxx
@@ -137,7 +137,10 @@ void AtkListener::updateChildList(accessibility::XAccessibleContext* pContext)
}
catch (lang::IndexOutOfBoundsException const&)
{
- assert(false); // not consistent with getAccessibleChildCount
+ sal_Int32 nChildren2 = pContext->getAccessibleChildCount();
+ assert(nChildren2 <= n); // consistency?
+ m_aChildList.resize(std::min(nChildren2, n));
+ break;
}
OSL_ASSERT(m_aChildList[n].is());
}