diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-01-13 11:42:38 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-01-25 08:56:01 +0000 |
commit | 12549c5b4deea7071958b644350dc2597b62c034 (patch) | |
tree | 4f9244e202ae4c9e918b9ab845f86ac09145fde4 | |
parent | tdf#153154: m_xDataTypeLB is still in use (diff) | |
download | core-12549c5b4deea7071958b644350dc2597b62c034.tar.gz core-12549c5b4deea7071958b644350dc2597b62c034.zip |
comphelper: check for nullptr
See https://crashreport.libreoffice.org/stats/signature/comphelper::OSelectionChangeMultiplexer::dispose()
Regression from 9931d6b1fb0406e16d56e186812884511738dcfa
"tdf#150575: REPORTBUILDER: Crash when closing report when used report
navigator"
Change-Id: I6e4ada368254879d983f80026e9b42ddb4186c51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145461
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit e4e2c7a63217c797802045d326f732296e0af918)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145443
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit a8b4523905bd5ed8ed06150927b4af3cdf40a7ba)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145577
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Patrick Luby <plubius@neooffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | comphelper/source/misc/SelectionMultiplex.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/comphelper/source/misc/SelectionMultiplex.cxx b/comphelper/source/misc/SelectionMultiplex.cxx index e4fb824a0ba3..438eaa80d718 100644 --- a/comphelper/source/misc/SelectionMultiplex.cxx +++ b/comphelper/source/misc/SelectionMultiplex.cxx @@ -100,7 +100,8 @@ void OSelectionChangeMultiplexer::dispose() osl_atomic_increment(&m_refCount); { Reference< XSelectionChangeListener> xPreventDelete(this); - m_xSet->removeSelectionChangeListener(xPreventDelete); + if(m_xSet.is()) + m_xSet->removeSelectionChangeListener(xPreventDelete); } osl_atomic_decrement(&m_refCount); } |