summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-05-19 12:03:24 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2022-05-19 17:45:22 +0200
commit2a813483cdbfb458ce62e8d9bdcf2506c0ed02a9 (patch)
tree199c6475d8cdd63599d5a68f0bf5863570ceffa8 /sw/source/uibase
parentd34a43701d2bdd7c006497904e962d09eb31ac58 (diff)
sw: fix assert in SwModule::Notify()
Apparently it happens when loading a 0-byte file that the SfxObjectShell is still in IsLoading() stage when close() is called. This then causes the SfxEventHintId::LoadFinished event to be emitted during close(), which is not a situation the assert was intended for. Change-Id: I60a260ca1c1e6cbf9502832ba6622de2628763e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134610 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/apphdl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 958b326f6400..22ccceac4271 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -879,7 +879,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
// assume that not calling via SwEditShell::SetFixFields
// is allowed, because the shell hasn't been created yet
- assert(!pWrtSh);
+ assert(!pWrtSh || pWrtSh->GetView().GetViewFrame()->GetFrame().IsClosing_Impl());
pDocSh->GetDoc()->getIDocumentFieldsAccess().SetFixFields(nullptr);
}
}