diff options
author | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-08-19 13:52:47 +0300 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-08-20 09:55:47 +0300 |
commit | 3f897940d90c579a884b13c613440bc85aabda18 (patch) | |
tree | b90dcf576e84e91bbd634a77f947da16f45e41bf | |
parent | 2b254506f5a939607df87e6477f4802d80dfa3de (diff) |
compositor-fbdev: fix VT switching crash
This bug was introduced in 954f183e2f9891b241c1efc0ea61ed56019a4326.
The session_notify() data was accidentally cast to fbdev_backend while
it is weston_compositor. This was possibly due to the code before the
mentioned commit casting data directly to fbdev_compositor without going
through the intended type first, which worked only because
weston_compositor was the first member in struct fbdev_compositor.
Fix the casts to be the right way around.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91654
Cc: nerdopolis1@verizon.net
Cc: Giulio Camuffo <giuliocamuffo@gmail.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
-rw-r--r-- | src/compositor-fbdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c index 051a381a..a5c79476 100644 --- a/src/compositor-fbdev.c +++ b/src/compositor-fbdev.c @@ -756,8 +756,8 @@ fbdev_backend_destroy(struct weston_compositor *base) static void session_notify(struct wl_listener *listener, void *data) { - struct fbdev_backend *backend = data; - struct weston_compositor *compositor = backend->compositor; + struct weston_compositor *compositor = data; + struct fbdev_backend *backend = to_fbdev_backend(compositor); struct weston_output *output; if (compositor->session_active) { |