mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 02:28:35 +00:00
Fix Coverity false positive for null-pointer dereference
This commit is contained in:
parent
3c094c739b
commit
af5257b6c3
@ -946,9 +946,9 @@ void docbookParagraphs(Text const &text,
|
||||
docstring id = docstring();
|
||||
for (pos_type i = 0; i < par->size(); ++i) {
|
||||
Inset const *inset = par->getInset(i);
|
||||
if (inset && dynamic_cast<InsetLabel const *>(inset)) {
|
||||
if (inset) {
|
||||
if (auto label = dynamic_cast<InsetLabel const *>(inset)) {
|
||||
// Generate the attributes for the section if need be.
|
||||
auto label = dynamic_cast<InsetLabel const *>(inset);
|
||||
id += "xml:id=\"" + xml::cleanID(label->screenLabel()) + "\"";
|
||||
|
||||
// Don't output the ID as a DocBook <anchor>.
|
||||
@ -958,6 +958,7 @@ void docbookParagraphs(Text const &text,
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Write the open tag for this section.
|
||||
docstring tag = from_utf8("<" + sectionTag);
|
||||
|
Loading…
Reference in New Issue
Block a user