From 318621e5c8ed760f97c180c34990d1560ac7fc05 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Mon, 19 Dec 2022 16:58:10 +0100 Subject: test return value from XResQueryClientIds() --- src/core/window-props.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') 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++) { -- cgit v1.2.1