aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-30 11:14:12 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-30 11:14:12 +0200
commit86d228bfc3e9c81c011c31bc81a908a21f975bfb (patch)
tree531964e8ccc8cd0ce74bb20da95553a235a711c5 /src
parent7b1cbb86ac2cc0843312ddb81c7ca4d9f137c660 (diff)
Attempt to fix crash
Diffstat (limited to 'src')
-rw-r--r--src/Body.cpp2
-rw-r--r--src/ImageViewer.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Body.cpp b/src/Body.cpp
index 7af2b49..718baee 100644
--- a/src/Body.cpp
+++ b/src/Body.cpp
@@ -331,7 +331,7 @@ namespace QuickMedia {
assert(!loading_thumbnail);
loading_thumbnail = true;
- load_thumbnail_future = std::async(std::launch::async, [this, url, local, thumbnail_resize_target_size, thumbnail_data]() {
+ load_thumbnail_future = std::async(std::launch::async, [this, url, local, thumbnail_resize_target_size, thumbnail_data]() mutable {
// TODO: Use sha256 instead of base64_url encoding
Path thumbnail_path = get_cache_dir().join("thumbnails").join(base64_url::encode(url));
diff --git a/src/ImageViewer.cpp b/src/ImageViewer.cpp
index c929086..e005337 100644
--- a/src/ImageViewer.cpp
+++ b/src/ImageViewer.cpp
@@ -40,7 +40,7 @@ namespace QuickMedia {
image_data->texture.setSmooth(true);
assert(!loading_image);
loading_image = true;
- image_loader_thread = std::thread([this, image_data, path]() {
+ image_loader_thread = std::thread([this, image_data, path]() mutable {
auto image = std::make_unique<sf::Image>();
if(image->loadFromFile(path.data)) {
image_data->image = std::move(image);