diff --git a/cockatrice/src/decklistmodel.cpp b/cockatrice/src/decklistmodel.cpp index a89841fb..983b36d2 100644 --- a/cockatrice/src/decklistmodel.cpp +++ b/cockatrice/src/decklistmodel.cpp @@ -19,6 +19,7 @@ DeckListModel::DeckListModel(CardDatabase *_db, QObject *parent) DeckListModel::~DeckListModel() { + delete root; } @@ -283,6 +284,7 @@ void DeckListModel::sort(int /*column*/, Qt::SortOrder order) void DeckListModel::cleanList() { + root->clearTree(); deckList->cleanList(); reset(); }