proto_data is NULL when run through eventcomm-test.
Signed-off-by: Chase Douglas <[email protected]>
---
src/eventcomm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/eventcomm.c b/src/eventcomm.c
index ce26934..a52e8b8 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -502,7 +502,7 @@ SynapticsReadEvent(InputInfoPtr pInfo, struct input_event
*ev)
ssize_t len;
#ifdef HAVE_MTDEV
- if (proto_data->mtdev)
+ if (proto_data && proto_data->mtdev)
len = mtdev_get(proto_data->mtdev, pInfo->fd, ev, 1) *
sizeof(struct input_event);
else
@@ -598,7 +598,7 @@ EventProcessTouch(InputInfoPtr pInfo)
SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private;
struct eventcomm_proto_data *proto_data = priv->proto_data;
- if (proto_data->cur_slot < 0 || !priv->has_touch)
+ if (!proto_data || proto_data->cur_slot < 0 || !priv->has_touch)
return;
/* If the ABS_MT_SLOT is the first event we get after EV_SYN, skip this */
--
1.7.8.3
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel