mu4e: Fix issue with mu4e-display-image

We were getting an error when `identify` is nil.
This commit is contained in:
Dirk-Jan C. Binnema 2020-07-11 10:14:57 +03:00
parent 2b5a747fad
commit de8f1d3e6a
1 changed files with 4 additions and 5 deletions

View File

@ -1129,11 +1129,10 @@ and MAXHEIGHT are ignored."
(imagemagick-types))) ;; hmm, should check for specific type
(identify (and have-im maxwidth
(executable-find mu4e-imagemagick-identify)))
(props (mapcar 'string-to-number
(split-string (and identify
(shell-command-to-string
(format "%s -format '%%w %%h' %s"
identify (shell-quote-argument imgpath)))))))
(props (and identify (mapcar 'string-to-number
(split-string (shell-command-to-string
(format "%s -format '%%w %%h' %s"
identify (shell-quote-argument imgpath)))))))
(width (and props (car props)))
(height (and props (car (cdr props))))