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.
This commit is contained in:
Timm Bäder 2021-09-18 13:08:46 +02:00
parent ae08aa3622
commit 24415a6ffb

View File

@ -59,7 +59,7 @@ gtk_css_image_url_load_image (GtkCssImageUrl *url,
if (texture == NULL) if (texture == NULL)
{ {
if (error) if (error && local_error)
{ {
char *uri; char *uri;
@ -70,7 +70,7 @@ gtk_css_image_url_load_image (GtkCssImageUrl *url,
"Error loading image '%s': %s", uri, local_error->message); "Error loading image '%s': %s", uri, local_error->message);
g_free (uri); g_free (uri);
} }
url->loaded_image = gtk_css_image_invalid_new (); url->loaded_image = gtk_css_image_invalid_new ();
} }
else else