[Libreoffice-commits] core.git: vcl/source
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 25 00:43:04 UTC 2021
vcl/source/window/window.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit a025ac482a8d21a517bbc2ef0ef2177dd6351689
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun Nov 8 09:15:25 2020 -0500
Commit: Ashod Nakashian <ash at collabora.com>
CommitDate: Thu Mar 25 01:42:11 2021 +0100
vcl: lok: don't use window impl after destroy
When destroying floating windows, accessing the GetLOKNotifier
can segfault. The following is the stack-trace from such
a case.
/usr/bin/loolforkit(_ZN7SigUtil13dumpBacktraceEv+0x5e)[0x55cbf9da62fe]
/usr/bin/loolforkit(+0x1d0af5)[0x55cbf9da6af5]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x128a0)[0x7fe0a125f8a0]
/opt/collaboraoffice6.4/program/libmergedlo.so(_ZNK3vcl6Window14GetLOKNotifierEv+0x7)[0x7fe09e67b827]
/opt/collaboraoffice6.4/program/libmergedlo.so(_ZN3vcl6Window24GetParentWithLOKNotifierEv+0x2b)[0x7fe09e67b86b]
/opt/collaboraoffice6.4/program/libmergedlo.so(_ZN14FloatingWindow12StateChangedE16StateChangedType+0x43)[0x7fe09e609a13]
/opt/collaboraoffice6.4/program/libmergedlo.so(_ZN3vcl6Window4ShowEb9ShowFlags+0x2ba)[0x7fe09e67cd5a]
/opt/collaboraoffice6.4/program/libmergedlo.so(_Z21ImplDestroyHelpWindowR14ImplSVHelpDatab+0xe3)[0x7fe09e90c193]
/opt/collaboraoffice6.4/program/libmergedlo.so(_ZN9Scheduler21ProcessTaskSchedulingEv+0x8ea)[0x7fe09e93817a]
/opt/collaboraoffice6.4/program/libmergedlo.so(_ZN14SvpSalInstance12CheckTimeoutEb+0x107)[0x7fe09ea06807]
/opt/collaboraoffice6.4/program/libmergedlo.so(_ZN14SvpSalInstance7DoYieldEbb+0x85)[0x7fe09ea06905]
/opt/collaboraoffice6.4/program/libmergedlo.so(+0x2f5d6fb)[0x7fe09e94f6fb]
/opt/collaboraoffice6.4/program/libmergedlo.so(_ZN11Application7ExecuteEv+0x45)[0x7fe09e950295]
/opt/collaboraoffice6.4/program/libmergedlo.so(+0x1f6d545)[0x7fe09d95f545]
/opt/collaboraoffice6.4/program/libmergedlo.so(_Z10ImplSVMainv+0x51)[0x7fe09e957321]
/opt/collaboraoffice6.4/program/libmergedlo.so(soffice_main+0x98)[0x7fe09d980b88]
/opt/collaboraoffice6.4/program/libmergedlo.so(+0x1f9e7c1)[0x7fe09d9907c1]
/usr/bin/loolforkit(_Z10lokit_mainRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S6_S6_S6_bbbbm+0x2562)[0x55cbf9d4c792]
/usr/bin/loolforkit(+0x15fc77)[0x55cbf9d35c77]
/usr/bin/loolforkit(_Z18forkLibreOfficeKitRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S6_S6_i+0xb44)[0x55cbf9d36b24]
/usr/bin/loolforkit(main+0x18a7)[0x55cbf9d00e17]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7fe0a0e7db97]
/usr/bin/loolforkit(_start+0x2a)[0x55cbf9d07efa]
Change-Id: Ia467d51896d1ac657bde5ae2803fcb2557ebd3fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105366
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ash at collabora.com>
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 9c874c1487b8..4c1b8c72d699 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3230,12 +3230,12 @@ ILibreOfficeKitNotifier::~ILibreOfficeKitNotifier()
const vcl::ILibreOfficeKitNotifier* Window::GetLOKNotifier() const
{
- return mpWindowImpl->mpLOKNotifier;
+ return mpWindowImpl ? mpWindowImpl->mpLOKNotifier : nullptr;
}
vcl::LOKWindowId Window::GetLOKWindowId() const
{
- return mpWindowImpl->mnLOKWindowId;
+ return mpWindowImpl ? mpWindowImpl->mnLOKWindowId : 0;
}
VclPtr<vcl::Window> Window::GetParentWithLOKNotifier()
More information about the Libreoffice-commits
mailing list