From 54564059c2d4c841a80c65f6a730e36412ee451e Mon Sep 17 00:00:00 2001 From: rpm-build Date: Fri, 9 Jun 2017 13:35:47 +1000 Subject: [PATCH] handle NullCursor to avoid crash --- hw/xfree86/drivers/modesetting/drmmode_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 6e755e9..431f63d 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -760,6 +760,8 @@ drmmode_set_cursor(xf86CrtcPtr crtc) if (!drmmode_crtc->set_cursor2_failed) { CursorPtr cursor = xf86CurrentCursor(crtc->scrn->pScreen); + if (cursor == NullCursor) + return TRUE; ret = drmModeSetCursor2(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, -- 2.9.4