From 087ff26c1a05c48dc59d6f2a12bf3fe2a6fc00ac Mon Sep 17 00:00:00 2001 From: John Sadler Date: Fri, 4 Sep 2015 15:50:22 +0100 Subject: [PATCH 4/4] rpi: prevent Weston segfaulting on shut-down due to NULL `backend` When running with the RPi backend, Weston sefaults during shutdown. This is due to the fact that `compositor->backend` is never initialised, and there is no NULL check prior to calling `destroy()`. This commit fixes the issue by making `rpi_backend_create()` intialise `compositor->backend` - just like the X11 backend does. --- src/compositor-rpi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compositor-rpi.c b/src/compositor-rpi.c index 340a974..3d2e09f 100644 --- a/src/compositor-rpi.c +++ b/src/compositor-rpi.c @@ -533,6 +533,8 @@ rpi_backend_create(struct weston_compositor *compositor, goto out_launcher; } + compositor->backend = &backend->base; + return backend; out_launcher: -- 1.8.1.4