mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
modesetting: handle NULL cursor in drmmode_set_cursor.
We had a bug reported with a touchscreen where we could end up in here with a NULL cursor, so let's not crash the X server. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-and-Tested-by: Daniel Martin <consume.noise@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Peter Hutterer
parent
43527d3181
commit
ce393de0ef
@@ -759,6 +759,9 @@ drmmode_set_cursor(xf86CrtcPtr crtc)
|
||||
CursorPtr cursor = xf86CurrentCursor(crtc->scrn->pScreen);
|
||||
int ret = -EINVAL;
|
||||
|
||||
if (cursor == NullCursor)
|
||||
return TRUE;
|
||||
|
||||
ret = drmModeSetCursor2(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
|
||||
handle, ms->cursor_width, ms->cursor_height,
|
||||
cursor->bits->xhot, cursor->bits->yhot);
|
||||
|
||||
Reference in New Issue
Block a user