Skip to content

Commit

Permalink
make sure a buffer is still alive before attempting to mark it up
Browse files Browse the repository at this point in the history
  • Loading branch information
orzechowskid committed Jul 20, 2019
1 parent d4be92e commit 891f54e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flymake-eslint.el
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ Create linter process for SOURCE-BUFFER which invokes CALLBACK once linter is fi
:sentinel (lambda (proc &rest ignored)
;; do stuff upon child process termination
(when (and (eq 'exit (process-status proc))
;; make sure we're not using a deleted buffer
(buffer-live-p source-buffer)
;; make sure we're using the latest lint process
(with-current-buffer source-buffer (eq proc flymake-eslint--process)))
;; read from eslint output then destroy temp buffer when done
Expand Down

0 comments on commit 891f54e

Please sign in to comment.