changeset 85072:c27859b68484

(image-type): Check if image-types is bound to not fail on tty.
author Juri Linkov <juri@jurta.org>
date Sat, 06 Oct 2007 22:17:49 +0000
parents 7ad3fd2afe10
children 6ae29c2dfff0
files lisp/image.el
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/image.el	Sat Oct 06 22:17:16 2007 +0000
+++ b/lisp/image.el	Sat Oct 06 22:17:49 2007 +0000
@@ -323,7 +323,7 @@
 		 (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)