desktop/source/lib/init.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 7c25b9c2a0770a66c18b4cd2f5d09d47fa7e057e Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri May 17 11:57:19 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri May 17 14:55:04 2024 +0200 WaE: C6011 Dereferencing NULL pointer warnings Change-Id: Ic67e884555517620acb6d43bafc28e8291720913 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167770 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 549319a7946c..2ab701cae3d2 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5113,8 +5113,8 @@ void LibLibreOffice_Impl::dumpState(rtl::OStringBuffer &rState) rState.append(" CallbackData: 0x"); rState.append(reinterpret_cast<sal_Int64>(mpCallback), 16); rState.append(" IsModified: "); - if (SfxObjectShell::Current()) - rState.append(SfxObjectShell::Current()->IsModified() ? "modified" : "unmodified"); + if (const SfxObjectShell* pObjSh = SfxObjectShell::Current()) + rState.append(pObjSh->IsModified() ? "modified" : "unmodified"); else rState.append("noshell"); // TODO: dump mInteractionMap