diff options
author | John Sadler <deathofathousandpapercuts@gmail.com> | 2015-09-05 15:01:40 +0100 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-09-08 16:53:45 +0300 |
commit | 76287896408841428804ab94dce2adb8b0b896e3 (patch) | |
tree | 9343647bead957336ab58938df51fdd096f96060 | |
parent | 960b5ebd825763c89386f265cb377092beee061a (diff) |
rpi: prevent segfault 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.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91886
Signed-off-by: John Sadler <deathofathousandpapercuts@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r-- | src/compositor-rpi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compositor-rpi.c b/src/compositor-rpi.c index 602cbeec..5d7f41d6 100644 --- a/src/compositor-rpi.c +++ b/src/compositor-rpi.c @@ -531,6 +531,8 @@ rpi_backend_create(struct weston_compositor *compositor, goto out_launcher; } + compositor->backend = &backend->base; + return backend; out_launcher: |