diff options
-rw-r--r-- | extensions/source/abpilot/datasourcehandling.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index 6ede832f8e25..486f89d85259 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -366,7 +366,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) { |