]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't have shr bug out if svg support isn't available
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 19 Oct 2019 08:23:19 +0000 (10:23 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 19 Oct 2019 08:23:19 +0000 (10:23 +0200)
* lisp/net/shr.el (shr-put-image): Don't bug out if SVG support
isn't available.

lisp/net/shr.el

index f3d5de9fb67c65c25eb934b920d1742741bd3425..93408840ab61c05d7a99cbbc87b2352581d152ee 100644 (file)
@@ -1075,7 +1075,8 @@ element is the data blob and the second element is the content-type."
                      (create-image data nil t :ascent 100
                                    :format content-type))
                     ((eq content-type 'image/svg+xml)
-                     (create-image data 'svg t :ascent 100))
+                      (when (image-type-available-p 'svg)
+                       (create-image data 'svg t :ascent 100)))
                     ((eq size 'full)
                      (ignore-errors
                        (shr-rescale-image data content-type