diff --git a/components/contentselector/model/contentmodel.cpp b/components/contentselector/model/contentmodel.cpp index d39df8ce6..3e5afc76d 100644 --- a/components/contentselector/model/contentmodel.cpp +++ b/components/contentselector/model/contentmodel.cpp @@ -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;