[texture] Check if the material is valid

The CoglMaterial handle might be invalid when we are disposing
the ClutterTexture, so we need to check before calling any
cogl_material_* API on it.
This commit is contained in:
Emmanuele Bassi 2009-02-11 17:52:50 +00:00
parent 29bff6890a
commit 5590958102

View File

@ -191,6 +191,7 @@ texture_free_gl_resources (ClutterTexture *texture)
CLUTTER_MARK();
if (priv->material != COGL_INVALID_HANDLE)
cogl_material_remove_layer (priv->material, 0);
}