Kaydet (Commit) 2083b535 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1019337 Dereference after null check

Change-Id: I31584f1b204b85929a5549ecd7f7e05b6968e580
üst 1f581d50
......@@ -1584,9 +1584,10 @@ SwXText::convertToTextFrame(
// todo: if the start/end is in a table then insert a paragraph
// before/after, move the start/end nodes, then convert and
// remove the additional paragraphs in the end
SwTableNode * pStartTableNode(0);
if (pStartStartNode->GetStartNodeType() == SwTableBoxStartNode)
{
SwTableNode * pStartTableNode(pStartStartNode->FindTableNode());
pStartTableNode = pStartStartNode->FindTableNode();
// Is it the same table start node than the end?
SwTableNode *const pEndStartTableNode(pEndStartNode->FindTableNode());
while (pEndStartTableNode && pStartTableNode &&
......@@ -1595,6 +1596,9 @@ SwXText::convertToTextFrame(
SwStartNode* pStartStartTableNode = pStartTableNode->StartOfSectionNode();
pStartTableNode = pStartStartTableNode->FindTableNode();
}
}
if (pStartTableNode)
{
const SwNodeIndex aTblIdx( *pStartTableNode, -1 );
SwPosition aBefore(aTblIdx);
bParaBeforeInserted = GetDoc()->getIDocumentContentOperations().AppendTxtNode( aBefore );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment