summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoakim Tjernlund <[email protected]>2022-12-19 16:58:10 +0100
committerlukefromdc <[email protected]>2023-01-14 15:31:49 -0500
commit318621e5c8ed760f97c180c34990d1560ac7fc05 (patch)
treefa8d1aab09acb93bb693d90fe23f9e08af7487b4 /src
parent2bdba6c22967496614b52bddf8186595f729a651 (diff)
downloadmarco-318621e5c8ed760f97c180c34990d1560ac7fc05.tar.bz2
marco-318621e5c8ed760f97c180c34990d1560ac7fc05.tar.xz
test return value from XResQueryClientIds()
Diffstat (limited to 'src')
-rw-r--r--src/core/window-props.c11
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++)
{