[cogl/wip/neil/pipeline-uniforms: 1/15] cogl-context: Destroy texture units later on
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/neil/pipeline-uniforms: 1/15] cogl-context: Destroy texture units later on
- Date: Fri, 4 Nov 2011 13:36:02 +0000 (UTC)
commit c68930abebc8860f03738fdeab2da45c34e43fd8
Author: Neil Roberts <neil linux intel com>
Date: Fri Nov 4 12:53:25 2011 +0000
cogl-context: Destroy texture units later on
This patch moves the call to _cogl_destroy_texture_units() from
_cogl_context_free() to later on. When destroying a GL texture the
texture units are checked. This would end up accessing invalid memory
so we need to try to destroy the texture units only after everything
that might be referencing a texture has been destroyed.
cogl/cogl-context.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
index bd3eca4..da41a82 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]