diff options
Diffstat (limited to 'cogl/cogl-context.c')
-rw-r--r-- | cogl/cogl-context.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c index 02f05a65..fe86721b 100644 --- a/cogl/cogl-context.c +++ b/cogl/cogl-context.c @@ -297,6 +297,7 @@ cogl_context_new (CoglDisplay *display, for (i = 0; i < COGL_BUFFER_BIND_TARGET_COUNT; i++) context->current_buffer[i] = NULL; + context->window_buffer = NULL; context->framebuffer_stack = _cogl_create_framebuffer_stack (); /* XXX: In this case the Clutter backend is still responsible for @@ -399,6 +400,12 @@ _cogl_context_free (CoglContext *context) _cogl_destroy_texture_units (); + if (context->window_buffer) + { + cogl_object_unref (context->window_buffer); + context->window_buffer = NULL; + } + _cogl_free_framebuffer_stack (context->framebuffer_stack); if (context->current_path) |