diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2013-02-19 18:38:38 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-02-20 13:50:43 +0000 |
commit | 62b97d063d4c51307ef4b5f67bd26c2522bca174 (patch) | |
tree | 985779cc6ccac8d53d0ae970aadbc5daf37dd0ee /pdf/pdf_js_none.c | |
parent | 8d889eb014fb6df5183679544d0f6f90fe4cacce (diff) | |
download | mupdf-62b97d063d4c51307ef4b5f67bd26c2522bca174.tar.xz |
Bug 693639: be even more NULL in pdf_js_none.c
Thanks to zeniko.
Diffstat (limited to 'pdf/pdf_js_none.c')
-rw-r--r-- | pdf/pdf_js_none.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/pdf/pdf_js_none.c b/pdf/pdf_js_none.c index 8d129609..bdf29002 100644 --- a/pdf/pdf_js_none.c +++ b/pdf/pdf_js_none.c @@ -1,30 +1,9 @@ #include "fitz-internal.h" #include "mupdf-internal.h" -struct pdf_js_s -{ - fz_context *ctx; - pdf_js_event event; -}; - pdf_js *pdf_new_js(pdf_document *doc) { - fz_context *ctx = doc->ctx; - pdf_js *js = fz_malloc_struct(ctx, pdf_js); - - fz_try(ctx) - { - js->ctx = doc->ctx; - js->event.target = NULL; - js->event.value = fz_strdup(ctx, ""); - js->event.rc = 1; - } - fz_catch(ctx) - { - pdf_drop_js(js); - } - - return js; + return NULL; } void pdf_js_load_document_level(pdf_js *js) @@ -33,11 +12,6 @@ void pdf_js_load_document_level(pdf_js *js) void pdf_drop_js(pdf_js *js) { - if (js) - { - fz_free(js->ctx, js->event.value); - fz_free(js->ctx, js); - } } void pdf_js_setup_event(pdf_js *js, pdf_js_event *e) @@ -46,7 +20,7 @@ void pdf_js_setup_event(pdf_js *js, pdf_js_event *e) pdf_js_event *pdf_js_get_event(pdf_js *js) { - return js ? &js->event : NULL; + return NULL; } void pdf_js_execute(pdf_js *js, char *code) |