diff options
author | Joakim Tjernlund <[email protected]> | 2022-12-19 16:58:10 +0100 |
---|---|---|
committer | lukefromdc <[email protected]> | 2023-01-14 15:31:49 -0500 |
commit | 318621e5c8ed760f97c180c34990d1560ac7fc05 (patch) | |
tree | fa8d1aab09acb93bb693d90fe23f9e08af7487b4 | |
parent | 2bdba6c22967496614b52bddf8186595f729a651 (diff) | |
download | marco-318621e5c8ed760f97c180c34990d1560ac7fc05.tar.bz2 marco-318621e5c8ed760f97c180c34990d1560ac7fc05.tar.xz |
test return value from XResQueryClientIds()
-rw-r--r-- | src/core/window-props.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/window-props.c b/src/core/window-props.c index b5883ad1..55923e5a 100644 --- a/src/core/window-props.c +++ b/src/core/window-props.c @@ -309,11 +309,12 @@ get_local_pid (MetaWindow *window) spec.client = window->xwindow; spec.mask = XRES_CLIENT_ID_PID_MASK; - XResQueryClientIds (window->display->xdisplay, - 1, - &spec, - &num_ids, - &client_ids); + if (!XResQueryClientIds (window->display->xdisplay, + 1, + &spec, + &num_ids, + &client_ids)) + return pid; for (i = 0; i < num_ids; i++) { |