From c2ed5f000efafdababa5aa2caa47b159b33ef65c Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Sun, 30 Mar 2014 16:27:52 +0200 Subject: [PATCH] coverity#735942 Unchecked dynamic_cast Change-Id: Id508e771b0f117437671f40060c68122a408e386 --- sw/source/filter/ww8/rtfattributeoutput.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 2074a06dc0da..97749ffdc74c 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -3679,7 +3679,8 @@ bool RtfAttributeOutput::FlyFrameOLEMath(const SwFlyFrmFmt* pFlyFrmFmt, SwOLENod oox::FormulaExportBase* pBase = dynamic_cast(dynamic_cast(xClosable.get())); assert( pBase != NULL ); OStringBuffer aBuf; - pBase->writeFormulaRtf(aBuf, m_rExport.eCurrentEncoding); + if (pBase) + pBase->writeFormulaRtf(aBuf, m_rExport.eCurrentEncoding); m_aRunText->append(aBuf.makeStringAndClear()); // Replacement graphic. m_aRunText->append("{" LO_STRING_SVTOOLS_RTF_MMATHPICT " ");