mirror of
https://github.com/brl/mutter.git
synced 2024-11-13 01:36:10 -05: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();
|
||||
|
||||
cogl_material_remove_layer (priv->material, 0);
|
||||
if (priv->material != COGL_INVALID_HANDLE)
|
||||
cogl_material_remove_layer (priv->material, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user