From 7cb8d59769d7f37157929a4176a8f16f6d4610e8 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 18 May 2015 14:25:11 +0100 Subject: don't assert on export of ooo74510-1.odt to .docx the math object is broken in the original .odt so we can't export its contents as it doesn't have any Change-Id: I8226cafed65b9e16a4aca6f48a4f711a55532975 --- sw/source/filter/ww8/docxattributeoutput.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sw') diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 986f3335fd7b..c7d42c0dcb9c 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4392,6 +4392,11 @@ void DocxAttributeOutput::WritePostponedMath(const SwOLENode* pPostponedMath) { uno::Reference < embed::XEmbeddedObject > xObj(const_cast(pPostponedMath)->GetOLEObj().GetOleRef()); uno::Reference< uno::XInterface > xInterface( xObj->getComponent(), uno::UNO_QUERY ); + if (!xInterface.is()) + { + SAL_WARN("sw.ww8", "Broken math object"); + return; + } // gcc4.4 (and 4.3 and possibly older) have a problem with dynamic_cast directly to the target class, // so help it with an intermediate cast. I'm not sure what exactly the problem is, seems to be unrelated // to RTLD_GLOBAL, so most probably a gcc bug. -- cgit