summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vbahelper/inc/vbahelper/vbaaccesshelper.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vbahelper/inc/vbahelper/vbaaccesshelper.hxx b/vbahelper/inc/vbahelper/vbaaccesshelper.hxx
index 01a520c33f83..2533b5cde180 100644
--- a/vbahelper/inc/vbahelper/vbaaccesshelper.hxx
+++ b/vbahelper/inc/vbahelper/vbaaccesshelper.hxx
@@ -63,7 +63,8 @@ namespace ooo
VBAHELPER_DLLPRIVATE inline bool isAlienDoc( SfxObjectShell& rDocShell, const char* pMimeType )
{
bool bRes( false );
- const SfxFilter *pFilt = rDocShell.GetMedium()->GetFilter();
+ const SfxMedium *pMedium = rDocShell.GetMedium();
+ const SfxFilter *pFilt = pMedium ? pMedium->GetFilter() : NULL;
if ( pFilt && pFilt->IsAlienFormat() )
bRes = ( pFilt->GetMimeType().compareToAscii( pMimeType ) == 0 );
return bRes;