From 48aa56227856b46d6502203f26464c05f16b6913 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 1 Oct 2020 23:27:15 +0200 Subject: Matrix: make set read marker async to fix stutter when receiving messages, also fix crash(?) when loading thumbnails that fail to load --- src/Body.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Body.cpp') 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(); -- cgit v1.2.3