diff options
Diffstat (limited to 'lisp/url/url-http.el')
-rw-r--r-- | lisp/url/url-http.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 3e74839dcb..bf8069ded7 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -123,8 +123,10 @@ request.") ;; like authentication. But we use another buffer afterwards. (unwind-protect (let ((proc (url-open-stream host buf host port))) - ;; Drop the temp buffer link before killing the buffer. - (set-process-buffer proc nil) + ;; url-open-stream might return nil. + (when (processp proc) + ;; Drop the temp buffer link before killing the buffer. + (set-process-buffer proc nil)) proc) (kill-buffer buf))))))) |