summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/ITiledRenderable.hxx9
-rw-r--r--sd/source/ui/inc/unomodel.hxx5
-rw-r--r--sfx2/source/view/lokhelper.cxx2
3 files changed, 15 insertions, 1 deletions
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index 163be5f55213..a17ed6347559 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -287,6 +287,15 @@ public:
virtual void completeFunction(int /*nIndex*/)
{
}
+
+ /**
+ * It can happen that the underlying implementation is being disposed, but
+ * somebedy is trying to access the data...
+ */
+ virtual bool isDisposed() const
+ {
+ return false;
+ }
};
} // namespace vcl
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index 9a5da032893b..b320abda4912 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -269,6 +269,11 @@ public:
virtual void moveSelectedParts(int nPosition, bool bDuplicate) override;
/// @see vcl::ITiledRenderable::getPartInfo().
virtual OUString getPartInfo(int nPart) override;
+ /// @see vcl::ITiledRenderable::isDisposed().
+ virtual bool isDisposed() const override
+ {
+ return mbDisposed;
+ }
// XComponent
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 3d549d5cf1e1..12a5a4bb2926 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -310,7 +310,7 @@ void SfxLokHelper::notifyInvalidation(SfxViewShell const* pThisView, const OStri
void SfxLokHelper::notifyDocumentSizeChanged(SfxViewShell const* pThisView, const OString& rPayload, vcl::ITiledRenderable* pDoc, bool bInvalidateAll)
{
- if (!pDoc || !comphelper::LibreOfficeKit::isActive() || DisableCallbacks::disabled())
+ if (!pDoc || pDoc->isDisposed() || !comphelper::LibreOfficeKit::isActive() || DisableCallbacks::disabled())
return;
if (bInvalidateAll)