Commit 28681e35 authored by Juri Linkov's avatar Juri Linkov
Browse files

(image-type): Check if image-types is bound to not fail on tty.

parent 7017d784
......@@ -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))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment