summaryrefslogtreecommitdiff
path: root/xfixes/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'xfixes/cursor.c')
-rw-r--r--xfixes/cursor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index 568e717fa..cc6e059b9 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -619,12 +619,12 @@ ReplaceCursorLookup(pointer value, XID id, pointer closure)
}
if (pCursor && pCursor != rcl->pNew) {
if ((*rcl->testCursor) (pCursor, rcl->closure)) {
- rcl->pNew->refcnt++;
+ CursorPtr curs = RefCursor(rcl->pNew);
/* either redirect reference or update resource database */
if (pCursorRef)
- *pCursorRef = rcl->pNew;
+ *pCursorRef = curs;
else
- ChangeResourceValue(id, RT_CURSOR, rcl->pNew);
+ ChangeResourceValue(id, RT_CURSOR, curs);
FreeCursor(pCursor, cursor);
}
}