about summary refs log tree commit diff
path: root/exwm-manage.el
diff options
context:
space:
mode:
Diffstat (limited to 'exwm-manage.el')
-rw-r--r--exwm-manage.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/exwm-manage.el b/exwm-manage.el
index ffe21e23e7ad..3274d65c177a 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -260,10 +260,9 @@ corresponding buffer.")
   "Kill an X client."
   (interactive)
   (unless id (setq id (exwm--buffer->id (current-buffer))))
-  (let ((pid (slot-value
-              (xcb:+request-unchecked+reply exwm--connection
-                  (make-instance 'xcb:ewmh:get-_NET_WM_PID :window id))
-              'value)))
+  (let* ((response (xcb:+request-unchecked+reply exwm--connection
+                       (make-instance 'xcb:ewmh:get-_NET_WM_PID :window id)))
+         (pid (and response (slot-value response 'value))))
     (if pid
         (signal-process pid 'SIGKILL)
       (xcb:+request exwm--connection