diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-10-01 23:27:15 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-10-01 23:27:15 +0200 |
commit | 48aa56227856b46d6502203f26464c05f16b6913 (patch) | |
tree | c0f102bd48c8d355bbb16f4231ec7e292e4cd415 /src/Body.cpp | |
parent | 05ac853d7397b922e8d96aff3cdbdff0b728625a (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.cpp | 2 |
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(); |