diff options
author | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2010-10-07 13:40:42 +0200 |
---|---|---|
committer | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2010-10-07 13:40:42 +0200 |
commit | b0e0b216e540ffcde8a0ec8f0c572bb90c464eb9 (patch) | |
tree | 5aae667fa38e2c1f7358593252747d5f0c5afd8c /lisp/url | |
parent | 29c72a6e4382d33779f7706719cb784ee4c4ef88 (diff) | |
download | emacs-b0e0b216e540ffcde8a0ec8f0c572bb90c464eb9.tar.gz |
url-http.el (url-http-end-of-document-sentinel): Protect against the
process buffer being killed.
Diffstat (limited to 'lisp/url')
-rw-r--r-- | lisp/url/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/url/url-http.el | 15 |
2 files changed, 13 insertions, 7 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 37a635e9906..4c4af45b1c2 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2010-10-07 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * url-http.el (url-http-end-of-document-sentinel): Protect against + the process buffer being killed. + 2010-10-04 Lars Magne Ingebrigtsen <larsi@gnus.org> * url-http.el (url-http-wait-for-headers-change-function): Protect diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 1c9c8c8a3de..9bfb6df1d42 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -874,13 +874,14 @@ should be shown to the user." (url-http-debug "url-http-end-of-document-sentinel in buffer (%s)" (process-buffer proc)) (url-http-idle-sentinel proc why) - (with-current-buffer (process-buffer proc) - (goto-char (point-min)) - (if (not (looking-at "HTTP/")) - ;; HTTP/0.9 just gets passed back no matter what - (url-http-activate-callback) - (if (url-http-parse-headers) - (url-http-activate-callback))))) + (when (buffer-name (process-buffer proc)) + (with-current-buffer (process-buffer proc) + (goto-char (point-min)) + (if (not (looking-at "HTTP/")) + ;; HTTP/0.9 just gets passed back no matter what + (url-http-activate-callback) + (if (url-http-parse-headers) + (url-http-activate-callback)))))) (defun url-http-simple-after-change-function (st nd length) ;; Function used when we do NOT know how long the document is going to be |