From 0c743c67bdaff9493196acc80fc2f2c04495c92e Mon Sep 17 00:00:00 2001 From: dldld Date: Mon, 17 Oct 2022 17:52:01 +0200 Subject: tdf#151608: Fix crash in disposing remotecontrol listener Clearing the listener twice seems to be the problem here, because the WeakComponentImplHelperBase::dispose() tries to access the cleared listener when it was already cleared, causing the crash. The problem which is fixed by this commit appears when the Impress Remote App is closed, which is connected to a running presentation. So closing the app "kills" the presentation. I think I have seen this also happening, when the connection was closed due to bad wifi. Which also makes sense as the communication thread is getting stopped and the listener will be destroyed. Change-Id: I3c8fa535cfd4d82c846494f76ffb9ce43ebd606a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141468 Reviewed-by: Mike Kaganski Tested-by: Mike Kaganski (cherry picked from commit e5aa82b259e35e3976734af38fff643ea28767df) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141851 Tested-by: Jenkins Reviewed-by: Michael Stahl --- sd/source/ui/remotecontrol/Communicator.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/sd/source/ui/remotecontrol/Communicator.cxx b/sd/source/ui/remotecontrol/Communicator.cxx index b0645e72d430..59509ed3c74b 100644 --- a/sd/source/ui/remotecontrol/Communicator.cxx +++ b/sd/source/ui/remotecontrol/Communicator.cxx @@ -130,7 +130,6 @@ void Communicator::informListenerDestroyed() if ( pTransmitter ) pTransmitter->addMessage( "slideshow_finished\n\n", Transmitter::PRIORITY_HIGH ); - mListener.clear(); } void Communicator::presentationStarted( const css::uno::Reference< -- cgit