Work around sporadic segfault on resume with intel/KMS due to cursor->bits == NULL.
Apparently SavedCursor is sometime tried to be set while already being set.
This commit is contained in:
parent
fe31f9c646
commit
3bdf364761
|
@ -461,6 +461,10 @@ xf86_use_hw_cursor (ScreenPtr screen, CursorPtr cursor)
|
|||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||
|
||||
if (xf86_config->cursor == cursor) {
|
||||
xf86DrvMsg(index, X_ERROR, "Trying to set already set cursor.\n");
|
||||
return FALSE;
|
||||
}
|
||||
if (xf86_config->cursor)
|
||||
FreeCursor (xf86_config->cursor, None);
|
||||
xf86_config->cursor = cursor;
|
||||
|
@ -480,6 +484,10 @@ xf86_use_hw_cursor_argb (ScreenPtr screen, CursorPtr cursor)
|
|||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||
|
||||
if (xf86_config->cursor == cursor) {
|
||||
xf86DrvMsg(index, X_ERROR, "Trying to set already set cursor.\n");
|
||||
return FALSE;
|
||||
}
|
||||
if (xf86_config->cursor)
|
||||
FreeCursor (xf86_config->cursor, None);
|
||||
xf86_config->cursor = cursor;
|
||||
|
|
Loading…
Reference in New Issue
Block a user