mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-18 13:20:47 +00:00
Avoid a memory leak
This commit is contained in:
parent
e14ada8f36
commit
2fbed21f83
@ -413,7 +413,7 @@ void ContentSelectorModel::ContentModel::addFile(EsmFile *file)
|
||||
if (!mFiles.at(row)->fileName().compare(file->fileName(), Qt::CaseInsensitive))
|
||||
{
|
||||
beginRemoveRows(QModelIndex(), row, row);
|
||||
mFiles.removeAt(row);
|
||||
delete mFiles.takeAt(row);
|
||||
endRemoveRows();
|
||||
emit dataChanged(index(row, 0), index(mFiles.size(), 0));
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user