summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/abpilot/datasourcehandling.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx
index 4ed9384162af..a8afb6299ed3 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -365,7 +365,8 @@ namespace abp
OSL_ENSURE( xStorable.is(),"DataSource is no XStorable!" );
if ( xStorable.is() )
{
- SfxObjectShell* pObjectShell = SfxViewFrame::Current()->GetObjectShell();
+ SfxViewFrame* pFrame = SfxViewFrame::Current();
+ SfxObjectShell* pObjectShell = pFrame ? pFrame->GetObjectShell() : nullptr;
OUString aOwnURL = lcl_getOwnURL(pObjectShell);
if (aOwnURL.isEmpty() || !rSettings.bEmbedDataSource)
{