summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-05-30 14:31:45 +0200
committerRobin Watts <robin.watts@artifex.com>2016-05-30 17:49:19 +0100
commit48722a72138d4077b7e3b58706359707373ea22d (patch)
tree04abb765fa24eb1c74ddfed72c116790ea9437ba
parente74df981077189c6408be4cdfb1f9dc4738e4ed0 (diff)
downloadmupdf-48722a72138d4077b7e3b58706359707373ea22d.tar.xz
Respect FZ_ENABLE_SVG=0 in HTML/EPUB.
Don't try to load SVG images if SVG support is disabled.
-rw-r--r--source/html/html-layout.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/html/html-layout.c b/source/html/html-layout.c
index 128afee5..ae3f9f21 100644
--- a/source/html/html-layout.c
+++ b/source/html/html-layout.c
@@ -396,12 +396,14 @@ static fz_image *load_html_image(fz_context *ctx, fz_archive *zip, const char *b
fz_try(ctx)
{
buf = fz_read_archive_entry(ctx, zip, path);
+#if FZ_ENABLE_SVG
if (strstr(path, ".svg"))
{
fz_write_buffer_byte(ctx, buf, 0);
img = fz_new_image_from_svg(ctx, buf);
}
else
+#endif
img = fz_new_image_from_buffer(ctx, buf);
}
fz_always(ctx)