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:
Roland Scheidegger 2010-03-12 16:52:56 +01:00 committed by Keith Packard
parent df9b6f16b2
commit 75efb46a14

View File

@ -461,10 +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;
++cursor->refcnt;
if (xf86_config->cursor)
FreeCursor (xf86_config->cursor, None);
xf86_config->cursor = cursor;
++cursor->refcnt;
if (cursor->bits->width > cursor_info->MaxWidth ||
cursor->bits->height> cursor_info->MaxHeight)