primitives: avoid leaking polygon override materials

If we have to make override changes to the user's source material to
handle cogl_polygon then we need to make sure we unref the override
material at the end.
This commit is contained in:
Robert Bragg 2010-11-25 20:12:36 +00:00
parent 01b93537ab
commit 58a467c927

View File

@ -1164,5 +1164,8 @@ cogl_polygon (const CoglTextureVertex *vertices,
attributes);
cogl_pop_source ();
if (pipeline != validate_state.original_pipeline)
cogl_object_unref (pipeline);
}