x86: shrink op_riprel
[binutils-gdb.git] / binutils / dwarf-mode.el
index d0152a54ca46493d99adebce68e8a9072995442f..9df875ca4fe8526e680698339d55e208afea1ed6 100644 (file)
@@ -1,8 +1,8 @@
 ;;; dwarf-mode.el --- Browser for DWARF information. -*-lexical-binding:t-*-
 
-;; Version: 1.6
+;; Version: 1.7
 
-;; Copyright (C) 2012-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2022 Free Software Foundation, Inc.
 
 ;; This file is not part of GNU Emacs, but is distributed under the
 ;; same terms:
           (set-marker (process-mark proc) (point))
          (set-buffer-modified-p nil))))))
 
-(defun dwarf--sentinel (_proc _status)
-  (setq mode-line-process nil)
-  (setq dwarf--process nil))
+(defun dwarf--sentinel (proc _status)
+  (when (buffer-live-p (process-buffer proc))
+    (with-current-buffer (process-buffer proc)
+      (setq mode-line-process nil)
+      (setq dwarf--process nil))))
 
 (defun dwarf--invoke (start end &rest command)
   "Invoke a command and arrange to insert output into the current buffer."