summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2008-07-13 18:41:53 +0930
committerPeter Hutterer <peter.hutterer@who-t.net>2008-07-13 20:54:33 +0930
commite7abe1676a6a4e4249504b8c9660cbad70569199 (patch)
tree0f6cced88cfaea597229255d1df72f26ef945b79 /Xi
parent2bbb12c355308d10bf123911044fbdf6ae7fb59c (diff)
Xi: protect against NULL handlers, don't try to dereference.
Diffstat (limited to 'Xi')
-rw-r--r--Xi/xiproperty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index 42f207808..17043beab 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -304,7 +304,8 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
XIPropertyHandlerPtr handler = dev->properties.handlers;
while(handler)
{
- if (!handler->SetProperty(dev, prop->propertyName, &new_value))
+ if (handler->SetProperty &&
+ !handler->SetProperty(dev, prop->propertyName, &new_value))
{
if (new_value.data)
xfree (new_value.data);
@@ -373,7 +374,8 @@ XIGetDeviceProperty (DeviceIntPtr dev, Atom property, Bool pending)
XIPropertyHandlerPtr handler = dev->properties.handlers;
while(handler)
{
- handler->GetProperty(dev, prop->propertyName);
+ if (handler->GetProperty)
+ handler->GetProperty(dev, prop->propertyName);
handler = handler->next;
}
}