diff options
-rw-r--r-- | src/XRecord.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/XRecord.c b/src/XRecord.c index efa47bd..11d23f6 100644 --- a/src/XRecord.c +++ b/src/XRecord.c @@ -509,14 +509,14 @@ XRecordGetContext(Display *dpy, XRecordContext context, void XRecordFreeState(XRecordState *state) { - for (unsigned long i = 0; i < state->nclients; i++) { - if (state->client_info[i]->ranges) { - if (state->client_info[i]->ranges[0]) - Xfree(state->client_info[i]->ranges[0]); - Xfree(state->client_info[i]->ranges); - } - } if (state->client_info) { + for (unsigned long i = 0; i < state->nclients; i++) { + if (state->client_info[i]->ranges) { + if (state->client_info[i]->ranges[0]) + Xfree(state->client_info[i]->ranges[0]); + Xfree(state->client_info[i]->ranges); + } + } if (state->client_info[0]) Xfree(state->client_info[0]); Xfree(state->client_info); |