aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-22 13:02:12 +0000
committermarha <marha@users.sourceforge.net>2010-04-22 13:02:12 +0000
commit2446c474aae15bcaf31e4b799f94f21d515984d5 (patch)
tree31c649543787afa72f5908dedf07ec8ae37a84a2 /xorg-server/Xi
parent0b44ee3fb92120190fa46e73b7abfbaa8a0adaec (diff)
downloadvcxsrv-2446c474aae15bcaf31e4b799f94f21d515984d5.tar.gz
vcxsrv-2446c474aae15bcaf31e4b799f94f21d515984d5.tar.bz2
vcxsrv-2446c474aae15bcaf31e4b799f94f21d515984d5.zip
svn merge -r541:HEAD "^/branches/released" .
Diffstat (limited to 'xorg-server/Xi')
-rw-r--r--xorg-server/Xi/sendexev.c3
-rw-r--r--xorg-server/Xi/xiquerydevice.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/xorg-server/Xi/sendexev.c b/xorg-server/Xi/sendexev.c
index 04ac9deab..bd96d74c7 100644
--- a/xorg-server/Xi/sendexev.c
+++ b/xorg-server/Xi/sendexev.c
@@ -138,8 +138,7 @@ ProcXSendExtensionEvent(ClientPtr client)
first = ((xEvent *) & stuff[1]);
if (!((EXTENSION_EVENT_BASE <= first->u.u.type) &&
- (first->u.u.type < lastEvent)))
- {
+ (first->u.u.type < lastEvent))) {
client->errorValue = first->u.u.type;
return BadValue;
}
diff --git a/xorg-server/Xi/xiquerydevice.c b/xorg-server/Xi/xiquerydevice.c
index 435868de2..47ab688fd 100644
--- a/xorg-server/Xi/xiquerydevice.c
+++ b/xorg-server/Xi/xiquerydevice.c
@@ -247,6 +247,9 @@ ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info, Bool reportState)
int mask_len;
int i;
+ if (!dev || !dev->button)
+ return 0;
+
mask_len = bytes_to_int32(bits_to_bytes(dev->button->numButtons));
info->type = ButtonClass;
@@ -259,7 +262,7 @@ ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info, Bool reportState)
memset(bits, 0, mask_len * 4);
if (reportState)
- for (i = 0; dev && dev->button && i < dev->button->numButtons; i++)
+ for (i = 0; i < dev->button->numButtons; i++)
if (BitIsOn(dev->button->down, i))
SetBit(bits, i);