summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2024-01-29 11:27:11 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2024-01-29 11:27:32 +1000
commit57ce2e8ba4c1f1bc5792e14bc7082f3ebd0915be (patch)
treef1fd8654037d3d4263c7d268277412ffea489060
parenta340bc0424a73d9fc4badbb7aee5284877635ca9 (diff)
Allow XIFreeDeviceInfo on a null pointer
-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);