mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
[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:
parent
29bff6890a
commit
5590958102
@ -191,7 +191,8 @@ texture_free_gl_resources (ClutterTexture *texture)
|
|||||||
|
|
||||||
CLUTTER_MARK();
|
CLUTTER_MARK();
|
||||||
|
|
||||||
cogl_material_remove_layer (priv->material, 0);
|
if (priv->material != COGL_INVALID_HANDLE)
|
||||||
|
cogl_material_remove_layer (priv->material, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user