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 c64e0103af
commit a57e6e7214

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);
}