]> git.eshelyaron.com Git - emacs.git/commitdiff
url-http.el (url-http-end-of-document-sentinel): Protect against the
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 7 Oct 2010 11:40:42 +0000 (13:40 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 7 Oct 2010 11:40:42 +0000 (13:40 +0200)
process buffer being killed.

lisp/url/ChangeLog
lisp/url/url-http.el

index 37a635e9906f392b23feb5a60138032f11ec0b56..4c4af45b1c22f471f68878a1281eaabf8bb943b5 100644 (file)
@@ -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
index 1c9c8c8a3de5077a9cebf63af2f3a88953d9fd46..9bfb6df1d424cd15ac983981c080a54be7874d53 100644 (file)
@@ -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