[mutter/wayland] shaped-texture: Prevent a critical when setting a NULL cogl texture
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] shaped-texture: Prevent a critical when setting a NULL cogl texture
- Date: Tue, 3 Dec 2013 02:34:33 +0000 (UTC)
commit 0850da44d734496c873385fb0169f9e891d7edeb
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Nov 26 12:35:12 2013 -0500
shaped-texture: Prevent a critical when setting a NULL cogl texture
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 9a5e183..8d45d9b 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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]