From 57ce2e8ba4c1f1bc5792e14bc7082f3ebd0915be Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 29 Jan 2024 11:27:11 +1000 Subject: Allow XIFreeDeviceInfo on a null pointer --- src/XIQueryDevice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3