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("\n\tCallbackData:\t0x"); rState.append(reinterpret_cast(mpCallback), 16); rState.append("\n\tIsModified:\t"); - 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