(smtp-submit-package): Handle the case that `smtp-find-connection' returns flim-1_14-wl-root
authorokazaki <okazaki>
Thu, 5 Aug 2010 02:50:40 +0000 (02:50 +0000)
committerokazaki <okazaki>
Thu, 5 Aug 2010 02:50:40 +0000 (02:50 +0000)
 nil in unwind forms.

ChangeLog
smtp.el

index 8e4e5d0..d2ff872 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-05  Tetsurou Okazaki  <okazaki@be.to>
+
+       * smtp.el (smtp-submit-package): Handle the case that
+       `smtp-find-connection' returns nil in unwind forms.
+
 2010-06-21  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * FLIM-CFG: Add emu subdirectory to load-path when LISPDIR is
diff --git a/smtp.el b/smtp.el
index ba95db6..fe511e9 100644 (file)
--- a/smtp.el
+++ b/smtp.el
@@ -399,7 +399,7 @@ BUFFER may be a buffer or a buffer name which contains mail message."
        (smtp-primitive-rcptto package)
        (smtp-primitive-data package))
     (let ((connection (smtp-find-connection (current-buffer))))
-      (when (smtp-connection-opened connection)
+      (when (and connection (smtp-connection-opened connection))
        (condition-case nil
            (smtp-primitive-quit package)
          (smtp-error))