summaryrefslogtreecommitdiff
path: root/src/preview/PreviewModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/preview/PreviewModel.cpp')
-rw-r--r--src/preview/PreviewModel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/preview/PreviewModel.cpp b/src/preview/PreviewModel.cpp
index f4cd6ec..b25d084 100644
--- a/src/preview/PreviewModel.cpp
+++ b/src/preview/PreviewModel.cpp
@@ -137,6 +137,7 @@ void PreviewModel::UpdateSave(int saveID, int saveDate)
for(int i = 0; i < saveComments->size(); i++)
delete saveComments->at(i);
saveComments->clear();
+ delete saveComments;
saveComments = NULL;
}
notifySaveChanged();
@@ -202,6 +203,7 @@ void PreviewModel::UpdateComments(int pageNumber)
{
for(int i = 0; i < saveComments->size(); i++)
delete saveComments->at(i);
+ saveComments->clear();
delete saveComments;
saveComments = NULL;
}