summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-21 14:08:22 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-21 21:24:27 +0000
commit533077e6297c6e779b1218ea852f90b72bf49755 (patch)
treea280fb3928c41f38b8deee610e3bb979dc62c8e5 /sw/source
parent77a202cbbf3735a6007ceb09f96f5e9258ef6df2 (diff)
crashtesting: post NPAPI removal crash fixing
Change-Id: I99d79735c375f3d632382a8efa0202517a293b1f
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx9
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2
2 files changed, 7 insertions, 4 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 );
}
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index a3a18bf6e687..00b544b84af4 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1748,7 +1748,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() );
OUString aURL( static_cast<const SwFormatURL*>(pItem)->GetURL() );
- const bool bIntern = '#' == aURL[0];
+ const bool bIntern = !aURL.isEmpty() ? '#' == aURL[0] : false;
// Create the destination for internal links:
sal_Int32 nDestId = -1;