diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx index 07de005ad281..88521ebb455e 100644 --- a/comphelper/source/misc/lok.cxx +++ b/comphelper/source/misc/lok.cxx @@ -328,7 +328,8 @@ bool anyInput() { bool bRet = false; - if (g_pAnyInputCallback && g_pAnyInputCallbackData) + // Ignore input events during background save. + if (!g_bForkedChild && g_pAnyInputCallback && g_pAnyInputCallbackData) { bRet = g_pAnyInputCallback(g_pAnyInputCallbackData); } diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index ba4864fa9a7b..1507ad6f810d 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -587,7 +587,12 @@ void SfxObjectShell::UpdateFromTemplate_Impl( ) bool SfxObjectShell::IsHelpDocument() const { - std::shared_ptr pFilter = GetMedium()->GetFilter(); + if (!pMedium) + { + return false; + } + + std::shared_ptr pFilter = pMedium->GetFilter(); return (pFilter && pFilter->GetFilterName() == "writer_web_HTML_help"); }