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
diff --git a/vcl/unx/gtk/a11y/atklistener.cxx b/vcl/unx/gtk/a11y/atklistener.cxx
index 3349be8..511ff0a 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());
}