aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-17 19:33:35 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-17 19:33:35 +0200
commit0c0bd4c53457c919078d1db36ec0ebe44734e131 (patch)
tree62a9c4dedc07782bb605e07c6f9ddced696788d8 /src
parent3b21eda9ad3b2ece9c6e5472eb419fb4d88424bd (diff)
Fix crash on incorrect options used
Diffstat (limited to 'src')
-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;