diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-12-20 15:41:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-12-21 09:30:18 +0000 |
commit | b0df6d86e4f18877a8d548075b8d73e3d87c81fd (patch) | |
tree | 3c847eef0765f855b07be4f168e03d6e40ad8ee0 /vbahelper/inc | |
parent | 545921f914ec172bcd6712cce54847131a49afb6 (diff) |
SfxObjectShell may not have a medium
Diffstat (limited to 'vbahelper/inc')
-rw-r--r-- | vbahelper/inc/vbahelper/vbaaccesshelper.hxx | 3 |
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; |