[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.
This commit is contained in:
parent
4f692cc3ee
commit
20cd885c3d
@ -2303,6 +2303,7 @@ on_fbo_source_size_change (GObject *object,
|
|||||||
CoglHandle tex;
|
CoglHandle tex;
|
||||||
|
|
||||||
/* tear down the FBO */
|
/* tear down the FBO */
|
||||||
|
if (priv->fbo_handle != COGL_INVALID_HANDLE)
|
||||||
cogl_handle_unref (priv->fbo_handle);
|
cogl_handle_unref (priv->fbo_handle);
|
||||||
|
|
||||||
texture_free_gl_resources (texture);
|
texture_free_gl_resources (texture);
|
||||||
|
Loading…
Reference in New Issue
Block a user