diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2017-06-02 12:44:54 -0700 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2017-06-03 21:26:46 -0700 |
commit | 2e0cdef05db0052899c0400bac574993157847fc (patch) | |
tree | ae3bd24d8765b4ad4deed238073bebf97f408e3b /source/fitz | |
parent | ac99be0eb766433e6f0bb6275b3e23791e7b7204 (diff) | |
download | mupdf-2e0cdef05db0052899c0400bac574993157847fc.tar.xz |
Allow fz_set_user_css to accept NULL.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/fitz/context.c b/source/fitz/context.c index 7ab1fefb..42806bc0 100644 --- a/source/fitz/context.c +++ b/source/fitz/context.c @@ -84,7 +84,7 @@ int fz_use_document_css(fz_context *ctx) void fz_set_user_css(fz_context *ctx, const char *user_css) { fz_free(ctx, ctx->style->user_css); - ctx->style->user_css = fz_strdup(ctx, user_css); + ctx->style->user_css = user_css ? fz_strdup(ctx, user_css) : NULL; } const char *fz_user_css(fz_context *ctx) |