[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-37-g10349d5e4

jonathan at claws-mail.org jonathan at claws-mail.org
Sun Aug 8 07:24:00 CEST 2021


The branch, gtk3 has been updated
       via  10349d5e4956de1e2297221381cd7ae4b1b432bd (commit)
      from  481897fc2a9bb9ae47a5e8c6a9fce22f3fa37689 (commit)

Summary of changes:
 src/plugins/litehtml_viewer/container_linux_images.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit 10349d5e4956de1e2297221381cd7ae4b1b432bd
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Sat Aug 7 21:32:28 2021 -0700

    Fix clearing local images from litehtml cache
    
    The cache clearing logic was double incrementing for cid: images, going
    into an infinite loop if a cid: image was the last one checked

diff --git a/src/plugins/litehtml_viewer/container_linux_images.cpp b/src/plugins/litehtml_viewer/container_linux_images.cpp
index 072192e47..6f749d14e 100644
--- a/src/plugins/litehtml_viewer/container_linux_images.cpp
+++ b/src/plugins/litehtml_viewer/container_linux_images.cpp
@@ -229,11 +229,13 @@ gint container_linux::clear_images(gsize desired_size)
 	lock_images_cache();
 
 	/* First, remove all local images - the ones with "cid:" URL. */
-	for (auto i = m_images.begin(); i != m_images.end(); ++i) {
+	for (auto i = m_images.begin(); i != m_images.end(); ) {
 		if (!strncmp(i->first.c_str(), "cid:", 4)) {
 			g_object_unref(i->second.first);
 			i = m_images.erase(i);
 			num++;
+		} else {
+			++i;
 		}
 	}
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list