summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/XIQueryDevice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/XIQueryDevice.c b/src/XIQueryDevice.c
index 51e2d0d..c89c4bc 100644
--- a/src/XIQueryDevice.c
+++ b/src/XIQueryDevice.c
@@ -150,7 +150,7 @@ void
XIFreeDeviceInfo(XIDeviceInfo* info)
{
XIDeviceInfo *ptr = info;
- while(ptr->name)
+ while(ptr && ptr->name)
{
Xfree(ptr->classes);
Xfree(ptr->name);