update.
[elisp/flim.git] / smtp.el
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))