aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/QuickMedia.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 6db58c9..7d7ae24 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -199,13 +199,15 @@ namespace QuickMedia {
}
Program::~Program() {
- running = false;
- if(upscale_images) {
+ if(upscale_images && running) {
+ running = false;
{
std::unique_lock<std::mutex> lock(image_upscale_mutex);
image_upscale_cv.notify_one();
}
image_upscale_thead.join();
+ } else {
+ running = false;
}
delete related_media_body;
delete body;