vcl/source/window/legacyaccessibility.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit c8fa7c01aa8a3e263c07b5cf4f72ace70f1d9308 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Mar 26 15:38:51 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Mar 26 17:45:00 2024 +0100 crash on deref null parent on attempting to find label ImplFindDlgCtrlWindow always calls ImplGetChildWindow with first arg which does pParent = ImplGetTopParentOfTabHierarchy( pParent ); vcl::Window* pWindow = ImplGetSubChildWindow( pParent, n, nIndex ); ImplGetSubChildWindow always derefs its first arg and ImplGetTopParentOfTabHierarchy only returns null if its input was null so ImplFindDlgCtrlWindow shouldn't be called with null program/libmergedlo.so(_ZNK3vcl6Window13ImplGetWindowEv+0x4)[0x7513e2a40e54] program/libmergedlo.so(+0x33ba57c)[0x7513e29ba57c] program/libmergedlo.so(+0x33ba97c)[0x7513e29ba97c] program/libmergedlo.so(+0x33baf64)[0x7513e29baf64] program/libmergedlo.so(+0x3378d47)[0x7513e2978d47] program/libmergedlo.so(_ZNK3vcl6Window30GetAccessibleRelationLabeledByEv+0x19c)[0x7513e297866c] program/libmergedlo.so(_ZN3vcl6Window18DumpAsPropertyTreeERN5tools10JsonWriterE+0x241)[0x7513e2a4b301] program/libmergedlo.so(_ZN6Dialog18DumpAsPropertyTreeERN5tools10JsonWriterE+0x2e)[0x7513e29b217e] program/libmergedlo.so(_ZN3vcl6Window18DumpAsPropertyTreeERN5tools10JsonWriterE+0x182)[0x7513e2a4b242] program/libmergedlo.so(_ZN3vcl3lok9dumpStateERN3rtl13OStringBufferE+0xc0)[0x7513e2d6ee80] Change-Id: I732550bd67c3af38627849a7d96d8ee6140008b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165348 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/vcl/source/window/legacyaccessibility.cxx b/vcl/source/window/legacyaccessibility.cxx index 346e1fdc8f2a..a0f4aff33919 100644 --- a/vcl/source/window/legacyaccessibility.cxx +++ b/vcl/source/window/legacyaccessibility.cxx @@ -109,7 +109,7 @@ Window* Window::getLegacyNonLayoutAccessibleRelationLabelFor() const static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Window* pLabeled ) { Window* pWindow = nullptr; - if ( (nMyType != WindowType::GROUPBOX) && (nMyType != WindowType::FIXEDLINE) ) + if (pFrameWindow && nMyType != WindowType::GROUPBOX && nMyType != WindowType::FIXEDLINE) { // search for a control that labels this window // a label is considered the last fixed text, fixed line or group box