diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c index bd3eca410..da41a8204 100644 --- a/cogl/cogl-context.c +++ b/cogl/cogl-context.c @@ -408,8 +408,6 @@ _cogl_context_free (CoglContext *context) winsys->context_deinit (context); - _cogl_destroy_texture_units (); - if (context->window_buffer) { cogl_object_unref (context->window_buffer); @@ -486,6 +484,8 @@ _cogl_context_free (CoglContext *context) cogl_pipeline_cache_free (context->pipeline_cache); + _cogl_destroy_texture_units (); + g_byte_array_free (context->buffer_map_fallback_array, TRUE); cogl_object_unref (context->display);