summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorKnut Petersen <Knut_Petersen@t-online.de>2013-02-26 07:52:59 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2013-05-06 10:20:18 +1000
commit05ca549d81f476561257076f354c781d590c9a4f (patch)
tree48b15ff39ec4963a0b6839fe9620340f7fac705f /Xi
parent2cc81338d1804a6a6c92f48773d3e1b2543a262b (diff)
Never try to execute BellProcPtr NULL.
This prevents xts XI/XDeviceBell-2 test from segfaulting the server. Signed-off-by: Knut Petersen <Knut_Petersen@t-online.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 4bff442ec5aa4b93a3f5c11782d4b7b9d1ae13ac)
Diffstat (limited to 'Xi')
-rw-r--r--Xi/devbell.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Xi/devbell.c b/Xi/devbell.c
index c75b94dee..202c8de18 100644
--- a/Xi/devbell.c
+++ b/Xi/devbell.c
@@ -142,7 +142,8 @@ ProcXDeviceBell(ClientPtr client)
newpercent = base + newpercent;
else
newpercent = base - newpercent + stuff->percent;
+ if (proc == NULL)
+ return BadValue;
(*proc) (newpercent, dev, ctrl, class);
-
return Success;
}