fixed crash when deleting media while it's being processed

This commit is contained in:
itsmattkc
2018-10-11 09:48:40 +11:00
parent 275cf5e92b
commit 7612a7646e
6 changed files with 28 additions and 6 deletions
+2 -2
View File
@@ -163,8 +163,8 @@ void Project::start_preview_generator(QTreeWidgetItem* item, Media* media, bool
MediaThrobber* throbber = new MediaThrobber(item);
PreviewGenerator* pg = new PreviewGenerator(item, media, replacing);
media->preview_gen = pg;
connect(pg, SIGNAL(set_icon(int, bool)), throbber, SLOT(stop(int, bool)));
connect(pg, SIGNAL(finished()), pg, SLOT(deleteLater()));
pg->start(QThread::LowPriority);
}
@@ -1209,7 +1209,7 @@ void Project::save_recent_projects() {
void Project::clear_recent_projects() {
recent_projects.clear();
save_recent_projects();
save_recent_projects();
}
void Project::add_recent_project(QString url) {