On 12.03.2010 16:29, Michel Dänzer wrote:
> From: Michel Dänzer <[email protected]>
> 
> Make sure the reference count of the new cursor is increased before the old
> one is decreased, otherwise bad things will happen if they're one and the
> same and the reference count is 1 initially. Not sure this can actually happen
> here, but better safe than sorry.
> 
> Signed-off-by: Michel Dänzer <[email protected]>

Reviewed-by: Roland Scheidegger <[email protected]>

> ---
>  Xext/saver.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/Xext/saver.c b/Xext/saver.c
> index 2549e8a..aa2e614 100644
> --- a/Xext/saver.c
> +++ b/Xext/saver.c
> @@ -620,10 +620,10 @@ CreateSaverWindow (ScreenPtr pScreen)
>               FreeResource (pWin->drawable.id, RT_NONE);
>               return FALSE;
>           }
> +     pAttr->pCursor->refcnt++;
>       if (pWin->optional->cursor)
>           FreeCursor (pWin->optional->cursor, (Cursor)0);
>       pWin->optional->cursor = pAttr->pCursor;
> -     pAttr->pCursor->refcnt++;
>       pWin->cursorIsNone = FALSE;
>       CheckWindowOptionalNeed (pWin);
>       mask |= CWCursor;

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to