[Cogl] [PATCH] context: Don't forget to unref() the renderer if we create it ourselves
Damien Lespiau
damien.lespiau at intel.com
Thu Jul 11 17:12:28 PDT 2013
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
More information about the Cogl
mailing list