diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-11-26 12:35:12 -0500 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-12-02 21:34:23 -0500 |
commit | 0850da44d734496c873385fb0169f9e891d7edeb (patch) | |
tree | b73ac5dc4f494f246d3abf29575e8726ec20baf7 | |
parent | 37ba264190b52c54ebe60824f6868a22b219b8af (diff) | |
download | mutter-0850da44d734496c873385fb0169f9e891d7edeb.tar.gz |
shaped-texture: Prevent a critical when setting a NULL cogl texture
-rw-r--r-- | src/compositor/meta-shaped-texture.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c index 9a5e18386..8d45d9bf0 100644 --- a/src/compositor/meta-shaped-texture.c +++ b/src/compositor/meta-shaped-texture.c @@ -227,10 +227,11 @@ set_cogl_texture (MetaShapedTexture *stex, if (priv->texture) cogl_object_unref (priv->texture); - priv->texture = cogl_object_ref (cogl_tex); + priv->texture = cogl_tex; if (cogl_tex != NULL) { + cogl_object_ref (cogl_tex); width = cogl_texture_get_width (COGL_TEXTURE (cogl_tex)); height = cogl_texture_get_height (COGL_TEXTURE (cogl_tex)); |