[gtk/wip/baedert/for-master] cssimageurl: Explicitly check for local_error != NULL
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master] cssimageurl: Explicitly check for local_error != NULL
- Date: Sat, 18 Sep 2021 11:34:50 +0000 (UTC)
commit 24415a6ffb1183bbc55aad6ba365c96f96ee10d5
Author: Timm Bäder <mail baedert org>
Date: Sat Sep 18 13:08:46 2021 +0200
cssimageurl: Explicitly check for local_error != NULL
This should always be the case since gdk_texture_new_from_file should
always set the error when it returns NULL, but make it explicit anyway.
gtk/gtkcssimageurl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcssimageurl.c b/gtk/gtkcssimageurl.c
index 15d56ac21e..8c9253744b 100644
--- a/gtk/gtkcssimageurl.c
+++ b/gtk/gtkcssimageurl.c
@@ -59,7 +59,7 @@ gtk_css_image_url_load_image (GtkCssImageUrl *url,
if (texture == NULL)
{
- if (error)
+ if (error && local_error)
{
char *uri;
@@ -70,7 +70,7 @@ gtk_css_image_url_load_image (GtkCssImageUrl *url,
"Error loading image '%s': %s", uri, local_error->message);
g_free (uri);
}
-
+
url->loaded_image = gtk_css_image_invalid_new ();
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]