From 28681e350ccd92660d2b1be048e49e3e1d049e5d Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sat, 6 Oct 2007 22:17:49 +0000 Subject: [PATCH] (image-type): Check if image-types is bound to not fail on tty. --- lisp/image.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/image.el b/lisp/image.el index 7e42c26dd69..99632b84307 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -323,7 +323,7 @@ Optional DATA-P non-nil means SOURCE is a string containing image data." (or (image-type-from-file-header source) (image-type-from-file-name source)))) (or type (error "Cannot determine image type"))) - (or (memq type image-types) + (or (memq type (and (boundp 'image-types) image-types)) (error "Invalid image type `%s'" type)) type) -- 2.39.5