summaryrefslogtreecommitdiff
path: root/extensions/source/abpilot/datasourcehandling.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/abpilot/datasourcehandling.cxx')
-rw-r--r--extensions/source/abpilot/datasourcehandling.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx
index a8afb6299ed3..ac9cbe69488c 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -368,7 +368,7 @@ namespace abp
SfxViewFrame* pFrame = SfxViewFrame::Current();
SfxObjectShell* pObjectShell = pFrame ? pFrame->GetObjectShell() : nullptr;
OUString aOwnURL = lcl_getOwnURL(pObjectShell);
- if (aOwnURL.isEmpty() || !rSettings.bEmbedDataSource)
+ if (aOwnURL.isEmpty() || !rSettings.bEmbedDataSource || !pObjectShell)
{
// Cannot or should not embed.
xStorable->storeAsURL(m_pImpl->sName,Sequence<PropertyValue>());