summaryrefslogtreecommitdiff
path: root/lisp/autorevert.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/autorevert.el')
-rw-r--r--lisp/autorevert.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index da8942664b7..cf145e0ee38 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -803,7 +803,8 @@ the timer when no buffers need to be checked."
;; Check if we should cancel the timer.
(when (and (not global-auto-revert-mode)
(null auto-revert-buffer-list))
- (cancel-timer auto-revert-timer)
+ (if (timerp auto-revert-timer)
+ (cancel-timer auto-revert-timer))
(setq auto-revert-timer nil)))))