[PATCH 2/2] Xi: don't ring the device bell if we don't have one

Knut Petersen Knut_Petersen at t-online.de
Mon Feb 25 23:22:54 PST 2013


On 26.02.2013 04:35, Peter Hutterer wrote:
> Test case: xts5/XI/DeviceBell (1/6)
>
> Reported-by: Knut Petersen <Knut_Petersen at t-online.de>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>   Xi/devbell.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Xi/devbell.c b/Xi/devbell.c
> index c75b94d..d4c9554 100644
> --- a/Xi/devbell.c
> +++ b/Xi/devbell.c
> @@ -142,7 +142,9 @@ ProcXDeviceBell(ClientPtr client)
>           newpercent = base + newpercent;
>       else
>           newpercent = base - newpercent + stuff->percent;
> -    (*proc) (newpercent, dev, ctrl, class);
> +
> +    if (proc)
> +        (*proc) (newpercent, dev, ctrl, class);
>   
>       return Success;

Still return Success?
Minutes ago I prepared the attached alternative ...

cu,
  Knut

>   }

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Never-try-to-execute-BellProcPtr-NULL.patch
Type: text/x-patch
Size: 844 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20130226/e6f46642/attachment.bin>


More information about the xorg-devel mailing list