summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2013-02-06 19:06:45 +0000
committerRobin Watts <robin.watts@artifex.com>2013-02-06 19:24:12 +0000
commitc42dac496e0994c4253eb50ce67ceaec864ed379 (patch)
treebe4888f9a55c3786b0be6fba754b04a786edd68f /apps
parentc9e73ad96492deeb14851d6af4b8be3f97548784 (diff)
downloadmupdf-c42dac496e0994c4253eb50ce67ceaec864ed379.tar.xz
Fix forgetting to open fz_output for xml output.
Diffstat (limited to 'apps')
-rw-r--r--apps/mudraw.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/mudraw.c b/apps/mudraw.c
index e3d4590b..30ebda57 100644
--- a/apps/mudraw.c
+++ b/apps/mudraw.c
@@ -727,15 +727,15 @@ int main(int argc, char **argv)
timing.minfilename = "";
timing.maxfilename = "";
- if (showtext)
- {
+ if (showxml || showtext)
out = fz_new_output_file(ctx, stdout);
- sheet = fz_new_text_sheet(ctx);
- }
if (showxml || showtext == TEXT_XML)
fz_printf(out, "<?xml version=\"1.0\"?>\n");
+ if (showtext)
+ sheet = fz_new_text_sheet(ctx);
+
if (showtext == TEXT_HTML)
{
fz_printf(out, "<style>\n");
@@ -825,8 +825,10 @@ int main(int argc, char **argv)
}
if (showtext)
- {
fz_free_text_sheet(ctx, sheet);
+
+ if (showxml || showtext)
+ {
fz_close_output(out);
out = NULL;
}