From e8275538e5a06a267d7e7e062103736dfdc3ac53 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Wed, 19 May 2010 01:02:16 +0100 Subject: [PATCH] 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. --- clutter/cogl/cogl/cogl-primitives.c | 1 + 1 file changed, 1 insertion(+) diff --git a/clutter/cogl/cogl/cogl-primitives.c b/clutter/cogl/cogl/cogl-primitives.c index 9cd23cd90..0f26f3616 100644 --- a/clutter/cogl/cogl/cogl-primitives.c +++ b/clutter/cogl/cogl/cogl-primitives.c @@ -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);