summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/DocumentContentOperationsManager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/DocumentContentOperationsManager.cxx')
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 8fdc82442736..962c69200f1f 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -2632,9 +2632,12 @@ SwFlyFrameFormat* DocumentContentOperationsManager::Insert(const SwPaM &rRg, con
if( !pFrameFormat )
{
sal_uInt16 nId = RES_POOLFRM_OLE;
- SvGlobalName aClassName( xObj->getClassID() );
- if (SotExchange::IsMath(aClassName))
- nId = RES_POOLFRM_FORMEL;
+ if (xObj.is())
+ {
+ SvGlobalName aClassName( xObj->getClassID() );
+ if (SotExchange::IsMath(aClassName))
+ nId = RES_POOLFRM_FORMEL;
+ }
pFrameFormat = m_rDoc.getIDocumentStylePoolAccess().GetFrameFormatFromPool( nId );
}