]> git.eshelyaron.com Git - emacs.git/commitdiff
(image-type): Check if image-types is bound to not fail on tty.
authorJuri Linkov <juri@jurta.org>
Sat, 6 Oct 2007 22:17:49 +0000 (22:17 +0000)
committerJuri Linkov <juri@jurta.org>
Sat, 6 Oct 2007 22:17:49 +0000 (22:17 +0000)
lisp/image.el

index 7e42c26dd69b848556a3389a2c26532f74bd6979..99632b84307934ba08f5b5bbe3f56d07570e9e4d 100644 (file)
@@ -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)