summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-01-21 22:29:29 +0100
committerCarl Hetherington <cth@carlh.net>2023-02-18 00:41:34 +0100
commit02037166d4384c3a51fcd7100eda6e200198438e (patch)
tree06931603f57a00b5104e7b71407ab4c7931a8704 /src
parent397b3ba911bd9fe955400c8c1fa1e8206acb45a8 (diff)
Don't cancel finished jobs otherwise their finished callbacks will be called again.
Diffstat (limited to 'src')
-rw-r--r--src/wx/text_panel.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc
index 95c422fd0..fa039dbde 100644
--- a/src/wx/text_panel.cc
+++ b/src/wx/text_panel.cc
@@ -826,7 +826,7 @@ TextPanel::try_to_load_analysis ()
if (!boost::filesystem::exists(path)) {
for (auto i: JobManager::instance()->get()) {
- if (dynamic_pointer_cast<AnalyseSubtitlesJob>(i)) {
+ if (dynamic_pointer_cast<AnalyseSubtitlesJob>(i) && !i->finished()) {
i->cancel ();
}
}