Fix a compiler warning
authorMatthias Clasen <mclasen@redhat.com>
Fri, 13 Jan 2023 16:42:20 +0000 (11:42 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 13 Jan 2023 17:07:40 +0000 (12:07 -0500)
Clang things that load_error might be NULL here.
It may be right.

gtk/gtkicontheme.c

index e98240c0103d59d55839c7419cd66d40131665d5..6340186fca1dde59500ca7c07c425b5e8e91d3b5 100644 (file)
@@ -3840,7 +3840,7 @@ icon_ensure_texture__locked (GtkIconPaintable *icon,
 
   if (!icon->texture)
     {
-      g_warning ("Failed to load icon %s: %s", icon->filename, load_error->message);
+      g_warning ("Failed to load icon %s: %s", icon->filename, load_error ? load_error->message : "");
       g_clear_error (&load_error);
       icon->texture = gdk_texture_new_from_resource (IMAGE_MISSING_RESOURCE_PATH);
       icon->icon_name = g_strdup ("image-missing");