Commit 622b3544 authored by Leonardo Taccari's avatar Leonardo Taccari Committed by Sebastian Ramacher

Close device.

Every fz_drop_device() need a corresponding fz_close_device().

This fixes the:

 warning: dropping unclosed device
 warning: ... repeated <n> times ..

warnings.
parent a3f70378
......@@ -31,6 +31,7 @@ pdf_page_render_to_buffer(mupdf_document_t* mupdf_document, mupdf_page_t* mupdf_
return ZATHURA_ERROR_UNKNOWN;
}
fz_close_device(mupdf_page->ctx, device);
fz_drop_device(mupdf_page->ctx, device);
fz_irect irect = { .x1 = page_width, .y1 = page_height };
......@@ -43,6 +44,7 @@ pdf_page_render_to_buffer(mupdf_document_t* mupdf_document, mupdf_page_t* mupdf_
device = fz_new_draw_device(mupdf_page->ctx, NULL, pixmap);
fz_run_display_list(mupdf_page->ctx, display_list, device, &fz_identity, &rect, NULL);
fz_close_device(mupdf_page->ctx, device);
fz_drop_device(mupdf_page->ctx, device);
fz_drop_pixmap(mupdf_page->ctx, pixmap);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment