sw/source/core/tox/tox.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 2941768d4f17f95a7450475d2e3e9173e3aa98fe Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Sep 26 16:59:51 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Sep 30 12:56:20 2019 +0200 null deref since... commit a5081700bacb90d8560959a4d65d94a2d4e8dadd Date: Fri Sep 20 10:31:40 2019 +0200 Change-Id: I4876b0ddeede794d8c638cccb7c825d1db122fdd Reviewed-on: https://gerrit.libreoffice.org/79652 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index d34c145979e6..7b7bb2e1071b 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -123,7 +123,8 @@ SwTOXMark::SwTOXMark(const SwTOXMark& rCopy) , m_bAutoGenerated(rCopy.m_bAutoGenerated) , m_bMainEntry(rCopy.m_bMainEntry) { - const_cast<SwTOXMark*>(&rCopy)->GetRegisteredIn()->Add(this); + if (auto pRegister = const_cast<SwTOXMark*>(&rCopy)->GetRegisteredIn()) + pRegister->Add(this); // Copy AlternativString m_aAltText = rCopy.m_aAltText; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits