mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
DocBook: Coverity potential problem for precooked bibliographies.
This commit is contained in:
parent
ac46456b28
commit
3d348818e0
@ -386,9 +386,10 @@ void makeParagraphBibliography(
|
||||
// Don't forget the citation ID!
|
||||
docstring attr;
|
||||
for (auto i = 0; i < par->size(); ++i) {
|
||||
Inset const *ip = par->getInset(0);
|
||||
if (ip != nullptr && ip->lyxCode() == BIBITEM_CODE) {
|
||||
const auto * bibitem = dynamic_cast<const InsetBibitem*>(par->getInset(i));
|
||||
Inset const *ip = par->getInset(i);
|
||||
if (!ip)
|
||||
continue;
|
||||
if (const auto * bibitem = dynamic_cast<const InsetBibitem*>(ip)) {
|
||||
attr = from_utf8("xml:id='") + bibitem->getParam("key") + from_utf8("'");
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user