summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-09-21 19:16:59 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2009-09-22 11:38:22 +1000
commitfcdc1d78cca3b8bb6b77d53eda7e21d649df6943 (patch)
tree6cad8fae59107668d41c5f89db1f11f25f7659ca
parent91e1fe5863a180b2d70a6943e83b98bbd4c9ebce (diff)
Fix sporadic segfault on resume due to accidentally freeing cursor.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--hw/xfree86/modes/xf86Cursors.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index fc4df8477..385848b7a 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -480,10 +480,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;
+ ++cursor->refcnt;
if (xf86_config->cursor)
FreeCursor (xf86_config->cursor, None);
xf86_config->cursor = cursor;
- ++cursor->refcnt;
/* Make sure ARGB support is available */
if ((cursor_info->Flags & HARDWARE_CURSOR_ARGB) == 0)