From: Michel Dänzer <michel.daen...@amd.com> Fixes a crash on startup in the radeon driver's drmmode_show_cursor() due to xf86_config->cursor == NULL, because no CRTC was enabled yet, so xf86_crtc_load_cursor_image was never called.
(Also use scrn->pScreen instead of xf86ScrnToScreen(scrn)) Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- hw/xfree86/modes/xf86Cursors.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c index b737268..cccfabf 100644 --- a/hw/xfree86/modes/xf86Cursors.c +++ b/hw/xfree86/modes/xf86Cursors.c @@ -456,7 +456,6 @@ xf86_crtc_load_cursor_image(xf86CrtcPtr crtc, CARD8 *src) CARD8 *cursor_image; const Rotation rotation = xf86_crtc_cursor_rotation(crtc); - xf86_config->cursor = xf86CurrentCursor(xf86ScrnToScreen(scrn)); crtc->cursor_argb = FALSE; if (rotation == RR_Rotate_0) @@ -507,6 +506,9 @@ xf86_load_cursor_image(ScrnInfoPtr scrn, unsigned char *src) return FALSE; } } + + xf86_config->cursor = xf86CurrentCursor(scrn->pScreen); + return TRUE; } -- 2.8.1 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel