summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-12-21 16:47:18 +0000
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2023-12-21 23:30:15 +0100
commit274380def4cdbf4cec86951c3a539b88043aa048 (patch)
treed9ab13e25e93ba48e3e8baf8f64a2984e70c79f4 /sw
parentb49ba07a60776b65fd0084c9a812fa60619e25aa (diff)
crashreporting: apparent null deref in a11y check
svl/source/items/itemset.cxx:801 svl/source/items/itemset.cxx:796 sw/source/core/access/AccessibilityCheck.cxx:1193 sw/source/core/access/AccessibilityCheck.cxx:1184 sw/source/core/access/AccessibilityCheck.cxx:1562 sw/source/core/access/AccessibilityCheck.cxx:1552 sw/source/core/txtnode/OnlineAccessibilityCheck.cxx:134 cppu/source/uno/copy.hxx:288 cppu/source/uno/any.cxx:72 cppu/source/typelib/typelib.cxx:1328 cppu/source/typelib/typelib.cxx:2169 Change-Id: I91a83ffb9f1912dd9736e3d6a194f63475f63b99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161109 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/access/AccessibilityCheck.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx
index 2e3219765e22..36226b028937 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -1029,10 +1029,12 @@ public:
return;
// Check if it's a real caption
- const SwNode* aStartFly = pCurrent->FindFlyStartNode();
- if (aStartFly
- && aStartFly->GetFlyFormat()->GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR)
- return;
+ if (const SwNode* pStartFly = pCurrent->FindFlyStartNode())
+ {
+ const SwFrameFormat* pFormat = pStartFly->GetFlyFormat();
+ if (!pFormat || pFormat->GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR)
+ return;
+ }
auto aIter = SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti>(*pTextNode);
auto nCount = 0;