[PATCH] dix: Add null pointer check to prevent crash.

Rami Ylimäki ext-rami.ylimaki at nokia.com
Fri Aug 7 07:53:18 PDT 2009


Ylimaki Rami wrote:
> Signed-off-by: Rami Ylimaki <ext-rami.ylimaki at nokia.com>
> ---
>  dix/events.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/dix/events.c b/dix/events.c
> index ec6aff7..448683f 100644
> --- a/dix/events.c
> +++ b/dix/events.c
> @@ -5421,7 +5421,7 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources)
>              /* If the focus window is a root window (ie. has no parent) then don't
>                 delete the focus from it. */
>  
> -            if ((pWin == focus->win) && (pWin->parent != NullWindow))
> +            if (focus && (pWin == focus->win) && (pWin->parent != NullWindow))
>              {
>                  int focusEventMode = NotifyNormal;
>  

Never mind, already fixed properly by the following commit:
http://cgit.freedesktop.org/xorg/xserver/commit/?id=ac13145dbcb284293582435409d8a90f276785c5


More information about the xorg-devel mailing list