mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-07 01:00:28 +00:00
cssprovider: Remove another path that can't be reached
... because the return value of a function is always TRUE.
This commit is contained in:
parent
697ed544dd
commit
6696aa2128
@ -2848,22 +2848,11 @@ gtk_css_provider_get_named (const gchar *name,
|
||||
if (resource != NULL)
|
||||
g_resources_register (resource);
|
||||
|
||||
if (!gtk_css_provider_load_from_path (provider, path, NULL))
|
||||
{
|
||||
if (resource != NULL)
|
||||
{
|
||||
g_resources_unregister (resource);
|
||||
g_resource_unref (resource);
|
||||
}
|
||||
g_object_unref (provider);
|
||||
provider = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Only set this after load success, as load_from_path will clear it */
|
||||
provider->priv->resource = resource;
|
||||
g_hash_table_insert (themes, g_strdup (key), provider);
|
||||
}
|
||||
gtk_css_provider_load_from_path (provider, path, NULL);
|
||||
|
||||
/* Only set this after load, as load_from_path will clear it */
|
||||
provider->priv->resource = resource;
|
||||
g_hash_table_insert (themes, g_strdup (key), provider);
|
||||
|
||||
g_free (path);
|
||||
g_free (dir);
|
||||
|
Loading…
Reference in New Issue
Block a user