On Fri, 2010-04-09 at 19:26 +0200, Jerome Glisse wrote: 
> During rotation the screen SourceValidate ptr is set to NULL
> (see hw/xfree86/modes/xf86Rotate.c xf86RotateRedisplay) to avoid
> segfaulting in exa unaccelerated path check for a valid SourceValidate
> ptr.
> 
> Signed-off-by: Jerome Glisse <[email protected]>
> ---
>  exa/exa_unaccel.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
> index b4ead7f..d4133bf 100644
> --- a/exa/exa_unaccel.c
> +++ b/exa/exa_unaccel.c
> @@ -465,7 +465,9 @@ ExaSrcValidate(DrawablePtr pDrawable,
>      REGION_UNINIT(pScreen, &reg);
>  
>      swap(pExaScr, pScreen, SourceValidate);
> -    pScreen->SourceValidate(pDrawable, x, y, width, height);
> +    if (pScreen->SourceValidate) {
> +        pScreen->SourceValidate(pDrawable, x, y, width, height);
> +    }
>      swap(pExaScr, pScreen, SourceValidate);
>  }

It would be slightly better to write this as

    if (pExaScr->SavedSourceValidate) {
swap(pExaScr, pScreen, SourceValidate);
pScreen->SourceValidate(pDrawable, x, y, width, height);
swap(pExaScr, pScreen, SourceValidate);
    }

But you have my

Acked-by: Michel Dänzer <[email protected]>

in either case.


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer




_______________________________________________
[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