sw: silence warning C6011: Dereferencing NULL pointer 'rFly.Lower()'
E: /jenkins/workspace/lo_tb_master_win_analyze/sw/source/core/text/EnhancedPDFExportHelper.cxx(519): error C2220: the following warning is treated as an error E: \jenkins\workspace\lo_tb_master_win_analyze\sw\source\core\text\EnhancedPDFExportHelper.cxx(488) : warning C6011: Dereferencing NULL pointer 'rFly.Lower()'. : Lines: 488, 485, 488 Change-Id: I84aa722428eb74137eb1520830dee69789861037 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211412 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
@@ -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<const SwNoTextFrame*>(rFly.Lower())->GetNode();
|
||||
const SwContentNode* pNode = static_cast<const SwNoTextFrame*>(pLower)->GetNode();
|
||||
SwOLENode* pOLENd = pNode ? const_cast<SwOLENode*>(pNode->GetOLENode()) : nullptr;
|
||||
if (!pOLENd)
|
||||
return OUString();
|
||||
|
||||
Reference in New Issue
Block a user