summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2009-07-29 17:33:18 -0400
committerEamon Walsh <ewalsh@tycho.nsa.gov>2009-07-29 17:33:18 -0400
commite7fa84d2281568d5d620dd6d1bde4f5044d14e50 (patch)
tree52dbf46c643e363de97b94ccc0c7f709bffbdea4 /src
parentc0e09be4086e76866e9ff22bfc02e5e96bd80a44 (diff)
Don't die on BadWindow errors when getting window context.
Diffstat (limited to 'src')
-rw-r--r--src/propmon.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/propmon.c b/src/propmon.c
index 85f6cee..30b9802 100644
--- a/src/propmon.c
+++ b/src/propmon.c
@@ -298,8 +298,14 @@ add_window(xcb_window_t window)
/* Get window context */
cookie = xcb_selinux_get_window_context(conn, window);
reply = xcb_selinux_get_window_context_reply(conn, cookie, &error);
- if (error)
+ if (error) {
+ /* window might have gone away */
+ if (error->error_code == XCB_WINDOW) {
+ free(error);
+ return;
+ }
APP_ERR(error, "An error was received during GetWindowContext.\n");
+ }
octx = xcb_selinux_get_window_context_context(reply);