summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoakim Tjernlund <[email protected]>2022-12-19 16:58:10 +0100
committerLuke from DC <[email protected]>2023-01-14 19:04:54 +0000
commit0f7a8c6d19874336040a11cf62a7ecb3c1dd9849 (patch)
tree7cd660e7b497b5671a807c268ba2c6c2b0fd3d75 /src
parent14ca155db113b4c359a270460585ba03c0ccc5c5 (diff)
downloadmarco-0f7a8c6d19874336040a11cf62a7ecb3c1dd9849.tar.bz2
marco-0f7a8c6d19874336040a11cf62a7ecb3c1dd9849.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 3414a3d9..b27809ab 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++)
{