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

Peter Hutterer peter.hutterer at who-t.net
Mon Feb 25 19:35:50 PST 2013


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;
 }
-- 
1.8.1.2



More information about the xorg-devel mailing list