summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFran Litterio <flitterio@gmail.com>2017-04-17 20:30:40 -0400
committerGlenn Morris <rgm@gnu.org>2017-04-17 20:30:40 -0400
commit4ad6be65f68a5c875ecbaa9e66d8ced28f43670a (patch)
tree95cd7494e3af26cd0dda1b030a7fff5afb9a0283
parent2d42bf7f5e57001a836b7b4e6303fac9d3f00a1d (diff)
downloademacs-4ad6be65f68a5c875ecbaa9e66d8ced28f43670a.tar.gz
Small erc-kill-channel fix (bug#23700)
* lisp/erc/erc.el (erc-kill-channel): Handle null erc-default-target.
-rw-r--r--lisp/erc/erc.el7
1 files 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'