mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-14 04:31:09 +00:00
Survive absence of librsvg without criticals
We can't guarantee that we can load svgs, so we shouldn't spew criticals when some of our own resources fail to load due to that reason.
This commit is contained in:
parent
69f12ed6a5
commit
0c87b62251
@ -364,11 +364,14 @@ gtk_make_symbolic_texture_from_resource (const char *path,
|
||||
GError **error)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
GdkTexture *texture;
|
||||
GdkTexture *texture = NULL;
|
||||
|
||||
pixbuf = gtk_make_symbolic_pixbuf_from_resource (path, width, height, scale, error);
|
||||
texture = gdk_texture_new_for_pixbuf (pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
if (pixbuf)
|
||||
{
|
||||
texture = gdk_texture_new_for_pixbuf (pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
return texture;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user