From b3955b095317466afd05b474666eef938b7f72d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 23 Jan 2014 16:25:06 -0800 Subject: [PATCH] compositor-drm: Set cursor surface to NULL when pageflip fails If we VT switch away between picking a cursor surface and actually doing the pageflip in drm_output_repaint(), we never set output->cursor_view to NULL. Then we unplug all the input devices and as the last pointer device goes away we destroy the cursor surface. Then when we switch back, we call drm_output_set_cursor() with an invalid surface and crashes. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73566 --- src/compositor-drm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index f908cff3..154e15e4 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -669,6 +669,7 @@ drm_output_repaint(struct weston_output *output_base, return 0; err_pageflip: + output->cursor_view = NULL; if (output->next) { drm_output_release_fb(output, output->next); output->next = NULL;