Small erc-kill-channel fix (bug#23700)

* lisp/erc/erc.el (erc-kill-channel): Handle null erc-default-target.
This commit is contained in:
Fran Litterio 2017-04-17 20:30:40 -04:00 committed by Glenn Morris
parent 2d42bf7f5e
commit 4ad6be65f6

View file

@ -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'