[Cogl] [PATCH] context: Don't forget to unref() the renderer if we create it ourselves
Robert Bragg
robert at sixbynine.org
Fri Jul 12 06:34:59 PDT 2013
Oops, yeah good catch, this looks good to land to me:
Reviewed-by: Robert Bragg <robert at linux.intel.com>
thanks,
- Robert
On Fri, Jul 12, 2013 at 1:12 AM, Damien Lespiau
<damien.lespiau at intel.com> wrote:
> cogl_display_new() takes a ref on the renderer, so code creating a
> renderer and not keeping a pointer to it do unref later needs to drop
> the ref immediately.
> ---
> cogl/cogl-context.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
> index 9b650bb..2a27b0c 100644
> --- a/cogl/cogl-context.c
> +++ b/cogl/cogl-context.c
> @@ -185,6 +185,7 @@ cogl_context_new (CoglDisplay *display,
> }
>
> display = cogl_display_new (renderer, NULL);
> + cogl_object_unref(renderer);
> }
> else
> cogl_object_ref (display);
> --
> 1.8.3.1
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl
More information about the Cogl
mailing list