diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index e2d928ba5be7..bd2c58adbf5d 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -482,10 +482,11 @@ LanguageType lcl_GetEnclosingLanguage(const SwTextPaintInfo& rInf, const SwEnhan // the StarMath source of the formula a frame holds, empty for anything else OUString lcl_GetFormulaSource(const SwFlyFrame& rFly) { - if (!rFly.Lower() || !rFly.Lower()->IsNoTextFrame()) + const SwFrame* pLower = rFly.Lower(); + if (!pLower || !pLower->IsNoTextFrame()) return OUString(); - const SwContentNode* pNode = static_cast(rFly.Lower())->GetNode(); + const SwContentNode* pNode = static_cast(pLower)->GetNode(); SwOLENode* pOLENd = pNode ? const_cast(pNode->GetOLENode()) : nullptr; if (!pOLENd) return OUString();