hw/xfree86: fix refcounting in xf86_use_hw_cursor
This is the same fix as was done in
fcdc1d78cc
for xf86_use_hw_cursor_argb.
Signed-off-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
df9b6f16b2
commit
75efb46a14
|
@ -461,10 +461,10 @@ xf86_use_hw_cursor (ScreenPtr screen, CursorPtr cursor)
|
||||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||||
|
|
||||||
|
++cursor->refcnt;
|
||||||
if (xf86_config->cursor)
|
if (xf86_config->cursor)
|
||||||
FreeCursor (xf86_config->cursor, None);
|
FreeCursor (xf86_config->cursor, None);
|
||||||
xf86_config->cursor = cursor;
|
xf86_config->cursor = cursor;
|
||||||
++cursor->refcnt;
|
|
||||||
|
|
||||||
if (cursor->bits->width > cursor_info->MaxWidth ||
|
if (cursor->bits->width > cursor_info->MaxWidth ||
|
||||||
cursor->bits->height> cursor_info->MaxHeight)
|
cursor->bits->height> cursor_info->MaxHeight)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user