aboutsummaryrefslogtreecommitdiff
path: root/src/Body.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-10-01 23:27:15 +0200
committerdec05eba <dec05eba@protonmail.com>2020-10-01 23:27:15 +0200
commit48aa56227856b46d6502203f26464c05f16b6913 (patch)
treec0f102bd48c8d355bbb16f4231ec7e292e4cd415 /src/Body.cpp
parent05ac853d7397b922e8d96aff3cdbdff0b728625a (diff)
Matrix: make set read marker async to fix stutter when receiving messages, also fix crash(?) when loading thumbnails that fail to load
Diffstat (limited to 'src/Body.cpp')
-rw-r--r--src/Body.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Body.cpp b/src/Body.cpp
index 673a095..6b352b3 100644
--- a/src/Body.cpp
+++ b/src/Body.cpp
@@ -470,7 +470,7 @@ namespace QuickMedia {
async_image_loader.load_thumbnail(item->thumbnail_url, item->thumbnail_is_local, thumbnail_resize_target_size, program->get_current_plugin()->use_tor, item_thumbnail);
}
- if(item_thumbnail->loading_state == LoadingState::FINISHED_LOADING) {
+ if(item_thumbnail->loading_state == LoadingState::FINISHED_LOADING && item_thumbnail->image->getSize().x > 0 && item_thumbnail->image->getSize().y > 0) {
if(!item_thumbnail->texture.loadFromImage(*item_thumbnail->image))
fprintf(stderr, "Warning: failed to load texture from image: %s\n", item->thumbnail_url.c_str());
item_thumbnail->image.reset();