Backport commit 06d716147 from Emacs

Fix some no-X build warnings
06d7161476255c77defa119fffa842b7abaa0dcb
Lars Ingebrigtsen
Mon Aug 22 19:22:33 2022 +0200
This commit is contained in:
Lars Ingebrigtsen 2022-08-22 19:22:27 +02:00 committed by Kyle Meyer
parent add8552b1d
commit 9c2bc2877f
1 changed files with 2 additions and 1 deletions

View File

@ -621,7 +621,8 @@ manner suitable for prepending to a user-specified script."
"Find any overlays for IMG-FILE in the current Org buffer, and refresh them."
(dolist (img-overlay org-inline-image-overlays)
(when (string= img-file (plist-get (cdr (overlay-get img-overlay 'display)) :file))
(when (file-exists-p img-file)
(when (and (file-exists-p img-file)
(fboundp 'image-flush))
(image-flush (overlay-get img-overlay 'display))))))
;;-----------------------------------------------------------------------------