diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-06-14 21:35:48 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-06-14 21:42:31 +0100 |
commit | 08b6fc12487eddbcbf1c445489e22426252b94da (patch) | |
tree | 25a89b8c0e7928c4cc5f65e5f089294ec4bb0ef6 | |
parent | f9574246ead2457963ede0c6d65e208ad6943258 (diff) | |
download | mupdf-08b6fc12487eddbcbf1c445489e22426252b94da.tar.xz |
Fix error handling in WinRT code (that I broke).
Just before pushing the previous commit of Michaels, I removed
an fz_var, thinking it wasn't required. After discussing it with
him I realise that it was needed, so reintroduce it here with
another error handling tweak. Apologies!
-rw-r--r-- | winrt/mupdfwinrt/muctx.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/winrt/mupdfwinrt/muctx.cpp b/winrt/mupdfwinrt/muctx.cpp index 5db701aa..11fd77b3 100644 --- a/winrt/mupdfwinrt/muctx.cpp +++ b/winrt/mupdfwinrt/muctx.cpp @@ -421,6 +421,8 @@ fz_display_list * muctx::CreateDisplayList(int page_num) /* Apparently not, lets go ahead and create and add to cache */ fz_var(dev); fz_var(page); + fz_var(dlist); + fz_try(ctx_clone) { page = fz_load_page(mu_doc, page_num); @@ -439,6 +441,7 @@ fz_display_list * muctx::CreateDisplayList(int page_num) } fz_catch(ctx_clone) { + fz_drop_display_list(ctx_clone, dlist); fz_free_context(ctx_clone); return NULL; } @@ -466,6 +469,7 @@ status_t muctx::RenderPage(int page_num, int width, int height, fz_var(dev); fz_var(pix); fz_var(page); + fz_var(dlist); fz_try(ctx_clone) { |