From 48722a72138d4077b7e3b58706359707373ea22d Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 30 May 2016 14:31:45 +0200 Subject: Respect FZ_ENABLE_SVG=0 in HTML/EPUB. Don't try to load SVG images if SVG support is disabled. --- source/html/html-layout.c | 2 ++ 1 file changed, 2 insertions(+) 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) -- cgit v1.2.3