From 2fbed21f83bc6c3af9f06b07e30ce306f1589111 Mon Sep 17 00:00:00 2001
From: Capostrophic <alexdobrohotov@yandex.ru>
Date: Sat, 18 May 2019 14:17:18 +0300
Subject: [PATCH] Avoid a memory leak

---
 components/contentselector/model/contentmodel.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/contentselector/model/contentmodel.cpp b/components/contentselector/model/contentmodel.cpp
index d39df8ce62..3e5afc76da 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;