mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Avoid potential leak of memory pointed to by QTreeWidgetItem catItem
This commit is contained in:
parent
aa18a079cf
commit
2bf7756196
@ -418,8 +418,9 @@ void GuiLyXFiles::updateContents()
|
||||
qstring_to_ucs4(guiString(catsave.mid(catsave.indexOf('/') + 1)))));
|
||||
}
|
||||
cat = toqstr(translateIfPossible(qstring_to_ucs4(guiString(cat))));
|
||||
QTreeWidgetItem * catItem = new QTreeWidgetItem();
|
||||
QTreeWidgetItem * catItem;
|
||||
if (!cats.contains(cat)) {
|
||||
catItem = new QTreeWidgetItem();
|
||||
catItem->setText(0, cat);
|
||||
catItem->setFont(0, capfont);
|
||||
filesLW->insertTopLevelItem(0, catItem);
|
||||
|
Loading…
Reference in New Issue
Block a user