[Commits] [SCM] claws branch, master, updated. 4.2.0-3-gd578448b2

mones at claws-mail.org mones at claws-mail.org
Sat Dec 2 20:12:51 UTC 2023


The branch, master has been updated
       via  d578448b2b5c9bf4f7a70906ee3230be5baba884 (commit)
      from  dd4c4e5152235f9f4f319cc9fdad9227ebf688c9 (commit)

Summary of changes:
 src/plugins/litehtml_viewer/container_linux_images.cpp | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)


- Log -----------------------------------------------------------------
commit d578448b2b5c9bf4f7a70906ee3230be5baba884
Author: Ricardo Mones <ricardo at mones.org>
Date:   Sat Dec 2 21:11:51 2023 +0100

    Distinguish messages and remove unnecessary goto

diff --git a/src/plugins/litehtml_viewer/container_linux_images.cpp b/src/plugins/litehtml_viewer/container_linux_images.cpp
index 2e06f32d5..4998a2adb 100644
--- a/src/plugins/litehtml_viewer/container_linux_images.cpp
+++ b/src/plugins/litehtml_viewer/container_linux_images.cpp
@@ -34,23 +34,21 @@ static GdkPixbuf *lh_get_image(const char *url)
 	GInputStream *image = http_loader->load_url(url, &error);
 
 	if (error || !image) {
+		if (error) {
+			g_warning("lh_get_image: Could not load URL for '%s': %s",
+				url, error->message);
+			g_clear_error(&error);
+		}
+	} else {
+		pixbuf = gdk_pixbuf_new_from_stream(image, NULL, &error);
 		if (error) {
 			g_warning("lh_get_image: Could not create pixbuf for '%s': %s",
 				url, error->message);
+			pixbuf = NULL;
 			g_clear_error(&error);
 		}
-		goto theend;
-	}
-
-	pixbuf = gdk_pixbuf_new_from_stream(image, NULL, &error);
-	if (error) {
-		g_warning("lh_get_image: Could not create pixbuf for '%s': %s",
-			url, error->message);
-		pixbuf = NULL;
-		g_clear_error(&error);
 	}
 
-theend:
 	delete http_loader;
 
 	return pixbuf;

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list