1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 00:23:51 +00:00

Avoid a memory leak

This commit is contained in:
Capostrophic 2019-05-18 14:17:18 +03:00
parent e14ada8f36
commit 2fbed21f83

View file

@ -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;