primitives: no longer assume _get_layers list remains valid

The internal CoglMaterialLayer pointers associated with a material may
change whenever layer properties are modified so it's no longer ok to
assume that a list of layers returned by cogl_material_get_layers
remains valid if the layers have been changed.
This commit is contained in:
Robert Bragg 2010-05-19 01:02:16 +01:00
parent b57f68245c
commit a5d6c02f7c

View File

@ -668,6 +668,7 @@ _cogl_rectangles_with_multitexture_coords (
/* If multitexturing failed or we are drawing with a sliced texture
* then we only support a single layer so we pluck out the texture
* from the first material layer... */
layers = cogl_material_get_layers (material);
first_layer = layers->data;
tex_handle = cogl_material_layer_get_texture (first_layer);