From 20cd885c3d6b8fce611c156a491ca93ea7ba13c6 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 30 Apr 2009 15:00:01 +0100 Subject: [PATCH] [ClutterTexture] Check before unrefing the fbo_handle When replacing the fbo_handle with a new handle it first unrefs the old handle. This was previously a call to cogl_offscreen_unref which silently ignored attempts to unref COGL_INVALID_HANDLE. However the new cogl_handle_unref does check for this so we should make sure the handle is valid to avoid the warning. --- clutter/clutter-texture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clutter/clutter-texture.c b/clutter/clutter-texture.c index 9eb1a3152..e4a380178 100644 --- a/clutter/clutter-texture.c +++ b/clutter/clutter-texture.c @@ -2303,7 +2303,8 @@ on_fbo_source_size_change (GObject *object, CoglHandle tex; /* tear down the FBO */ - cogl_handle_unref (priv->fbo_handle); + if (priv->fbo_handle != COGL_INVALID_HANDLE) + cogl_handle_unref (priv->fbo_handle); texture_free_gl_resources (texture);