summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-25 08:55:09 +0100
committerDavid Tardon <dtardon@redhat.com>2015-08-26 15:44:12 +0000
commitf6790861e289a9c7c1d6b49757a8e405b2f65b17 (patch)
tree5b0b0bc14858a62ae35c94b1fc2c078af091dbde /sw
parentaf3b581d2678622f992433cc37c16db0f4549489 (diff)
there may be no storage available in older formats
(cherry picked from commit 666fb214e93d542dd80e48b9e008727129b5764f) Change-Id: I23cbaf7fc1320168eb75ca33fd6d704125508785 Reviewed-on: https://gerrit.libreoffice.org/17987 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/core/data/ww5/pass/crash-2.docbin0 -> 4203 bytes
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx9
2 files changed, 7 insertions, 2 deletions
diff --git a/sw/qa/core/data/ww5/pass/crash-2.doc b/sw/qa/core/data/ww5/pass/crash-2.doc
new file mode 100644
index 000000000000..23a189712d8c
--- /dev/null
+++ b/sw/qa/core/data/ww5/pass/crash-2.doc
Binary files differ
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index b09fec67d5bf..c2152837efd4 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -337,8 +337,11 @@ bool SwWW8ImplReader::ImportOleWMF(SvStorageRef xSrc1,GDIMetaFile &rWMF,
SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
const Graphic* pGrf, const SfxItemSet* pFlySet, const Rectangle& aVisArea )
{
- SdrObject* pRet = 0;
- OSL_ENSURE( pStg, "ohne storage geht hier fast gar nichts!" );
+ if (!pStg)
+ {
+ SAL_WARN("sw.ww8", "no storage for ole objects");
+ return nullptr;
+ }
::SetProgressState( nProgress, rDoc.GetDocShell() ); // Update
@@ -390,6 +393,8 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
}
}
+ SdrObject* pRet = 0;
+
if (!(bIsHeader || bIsFooter))
{
//Can't put them in headers/footers :-(