This commit is contained in:
Saveliy Skresanov 2013-07-07 11:52:43 +07:00
commit 3c5a341dbc

View File

@ -347,9 +347,21 @@ void PreviewModel::Update()
} }
PreviewModel::~PreviewModel() { PreviewModel::~PreviewModel() {
if (updateSaveDataWorking)
{
pthread_cancel(updateSaveDataThread); pthread_cancel(updateSaveDataThread);
pthread_join(updateSaveDataThread, NULL);
}
if (updateSaveInfoWorking)
{
pthread_cancel(updateSaveInfoThread); pthread_cancel(updateSaveInfoThread);
pthread_join(updateSaveInfoThread, NULL);
}
if (updateSaveCommentsWorking)
{
pthread_cancel(updateSaveCommentsThread); pthread_cancel(updateSaveCommentsThread);
pthread_join(updateSaveCommentsThread, NULL);
}
if(save) if(save)
delete save; delete save;
if(saveComments) if(saveComments)