coverity#1362777 Explicit null dereferenced

Change-Id: I5db9cf469677b8509c19d6489472a4cf0babeca5
This commit is contained in:
Caolán McNamara
2016-06-19 17:14:43 +01:00
parent e3b81f3df6
commit 0e2a656104

View File

@@ -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>());