aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pactl.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/pactl.el b/pactl.el
index a105fda..2d719d0 100644
--- a/pactl.el
+++ b/pactl.el
@@ -52,7 +52,7 @@
(message "Profile change failed.")))
(defun pactl-get-cards ()
- (kill-buffer pactl-buffer)
+ (when (get-buffer pactl-buffer) (kill-buffer pactl-buffer))
(call-process-shell-command "pactl -f json list cards" nil pactl-buffer)
(pactl-parse-buffer))