summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-01-13 11:42:38 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-14 06:41:06 +0000
commite4e2c7a63217c797802045d326f732296e0af918 (patch)
tree8f8f4b158c2427e30c3b3416ac583bbe49cfce77 /comphelper
parent678747f95083be6f3e4d184e6258e49086952f45 (diff)
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>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/SelectionMultiplex.cxx3
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);
}