From 4ad6be65f68a5c875ecbaa9e66d8ced28f43670a Mon Sep 17 00:00:00 2001 From: Fran Litterio Date: Mon, 17 Apr 2017 20:30:40 -0400 Subject: [PATCH] Small erc-kill-channel fix (bug#23700) * lisp/erc/erc.el (erc-kill-channel): Handle null erc-default-target. --- lisp/erc/erc.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 488404d7341..7e19ebbf980 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -6735,9 +6735,10 @@ This function should be on `erc-kill-server-hook'." This function should be on `erc-kill-channel-hook'." (when (erc-server-process-alive) (let ((tgt (erc-default-target))) - (erc-server-send (format "PART %s :%s" tgt - (funcall erc-part-reason nil)) - nil tgt)))) + (if tgt + (erc-server-send (format "PART %s :%s" tgt + (funcall erc-part-reason nil)) + nil tgt))))) ;;; Dealing with `erc-parsed' -- 2.39.5