Fix reference counting of textures loaded via _load_uri_sync
Avoid double unref, fixes image previews.
This commit is contained in:
parent
8d9fc28872
commit
e12587619b
@ -845,16 +845,16 @@ shell_texture_cache_load_uri_sync (ShellTextureCache *cache,
|
||||
texdata = pixbuf_to_cogl_handle (pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
|
||||
clutter_texture_set_cogl_texture (texture, texdata);
|
||||
|
||||
if (policy == SHELL_TEXTURE_CACHE_POLICY_FOREVER)
|
||||
{
|
||||
g_hash_table_insert (cache->priv->keyed_cache, cache_key_dup (&key), texdata);
|
||||
}
|
||||
else
|
||||
{
|
||||
cogl_handle_unref (texdata);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
clutter_texture_set_cogl_texture (texture, texdata);
|
||||
|
||||
return CLUTTER_ACTOR (texture);
|
||||
|
Loading…
Reference in New Issue
Block a user