From 831659b3b88d42ea5e4adab2be3316cfffa2efd1 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 13 Dec 2020 01:11:56 +0100 Subject: [PATCH] * Fix `memory-report' for '--without-x' builds * lisp/emacs-lisp/memory-report.el (memory-report--image-cache): Don't call `image-cache-size' if unbound. --- lisp/emacs-lisp/memory-report.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/memory-report.el b/lisp/emacs-lisp/memory-report.el index c88d9f2768a..04ae87d9ea0 100644 --- a/lisp/emacs-lisp/memory-report.el +++ b/lisp/emacs-lisp/memory-report.el @@ -294,7 +294,9 @@ by counted more than once." (overlay-lists))))) (defun memory-report--image-cache () - (list (cons "Total Image Cache Size" (image-cache-size)))) + (list (cons "Total Image Cache Size" (if (fboundp 'image-cache-size) + (image-cache-size) + 0)))) (provide 'memory-report) -- 2.39.2