vcl/source/window/layout.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b1d57168b8cecc1713e729c22260feaf33fab29f
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Jun 9 09:11:09 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Jun 9 11:51:15 2022 +0200

    a Frame has max two children
    
    during creation it might not have all its children created yet
    if a11y querys it during its setup.
    
    Change-Id: Ifbbec7eeb80409dc5e871c2022d1ee1e36c6e74f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135526
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 7ee87733c503..946e2cce2732 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1499,7 +1499,7 @@ const vcl::Window *VclFrame::get_label_widget() const
 {
     if (m_pLabel)
         return m_pLabel;
-    assert(GetChildCount() == 2);
+    assert(GetChildCount() <= 2);
     //The label widget is normally the first (of two) children
     const WindowImpl* pWindowImpl = ImplGetWindowImpl();
     if (pWindowImpl->mpFirstChild == pWindowImpl->mpLastChild) //no label 
exists

Reply via email to