[PATCH weston] gl-renderer: Set renderer to NULL after destroyed

Ucan, Emre (ADITG/SW1) eucan at de.adit-jv.com
Tue Aug 11 00:09:12 PDT 2015


The pointer of the renderer in the compositor data structure is controlled
in weston_compositor_shutdown. When it is not NULL, the destroy method of
the renderer is called. Therefore, the renderer pointer should be set to NULL
in gl_renderer_destroy, so that it would not be called when it is already destroyed.

Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
---
 src/gl-renderer.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gl-renderer.c b/src/gl-renderer.c
index 88db26b..62b5b36 100644
--- a/src/gl-renderer.c
+++ b/src/gl-renderer.c
@@ -2124,6 +2124,8 @@ gl_renderer_destroy(struct weston_compositor *ec)
 		weston_binding_destroy(gr->fan_binding);
 
 	free(gr);
+
+	ec->renderer = NULL;
 }
 
 static void
-- 
1.7.9.5



More information about the wayland-devel mailing list