[Commits] [SCM] claws branch, master, updated. 3.18.0-26-gdae174542

jonathan at claws-mail.org jonathan at claws-mail.org
Mon Aug 2 07:04:35 CEST 2021


The branch, master has been updated
       via  dae174542ee5a97c297a0e2491d3820fa0c6ff4c (commit)
      from  4a03c10db14d4ca7d8490aa48281817f528a6b28 (commit)

Summary of changes:
 src/plugins/litehtml_viewer/container_linux_images.cpp | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit dae174542ee5a97c297a0e2491d3820fa0c6ff4c
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Sat Jul 31 20:40:30 2021 -0700

    LiteHTML pixbuf cache fixes
    
    Add a missing call to unlock_images_cache
    
    Move the check for blocking remote content to before inserting the NULL
    entry into the cache.  Otherwise the NULL entries will remain if remote
    content is enabled later on, which prevents further attempts to download it.

diff --git a/src/plugins/litehtml_viewer/container_linux_images.cpp b/src/plugins/litehtml_viewer/container_linux_images.cpp
index 1e0d70f83..072192e47 100644
--- a/src/plugins/litehtml_viewer/container_linux_images.cpp
+++ b/src/plugins/litehtml_viewer/container_linux_images.cpp
@@ -110,8 +110,15 @@ void container_linux::load_image( const litehtml::tchar_t* src, const litehtml::
 			if (pixbuf != NULL)
 				m_images.insert(std::make_pair(src, std::make_pair(pixbuf, last)));
 
+			unlock_images_cache();
 			return;
 		} else {
+			if (!lh_prefs_get()->enable_remote_content) {
+				debug_print("blocking download of image from '%s'\n", src);
+				unlock_images_cache();
+				return;
+			}
+
 			request = true;
 			m_images.insert(std::make_pair(url, std::make_pair((GdkPixbuf *)NULL, last)));
 		}
@@ -125,11 +132,6 @@ void container_linux::load_image( const litehtml::tchar_t* src, const litehtml::
 	if (request) {
 		struct FetchCtx *ctx;
 
-		if (!lh_prefs_get()->enable_remote_content) {
-			debug_print("blocking download of image from '%s'\n", src);
-			return;
-		}
-
 		debug_print("allowing download of image from '%s'\n", src);
 
 		ctx = g_new(struct FetchCtx, 1);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list