diff --git a/cogl/cogl-primitives.c b/cogl/cogl-primitives.c index 9cd23cd90..0f26f3616 100644 --- a/cogl/cogl-primitives.c +++ b/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);