Commit 156eb443 authored by Christian Persch's avatar Christian Persch
Browse files

pdf: Fix dispose implementation

Dispose must be safe against multiple runs, so set pointers to NULL
after freeing them.
parent 45fcc74b
Pipeline #340403 passed with stage
in 4 minutes and 31 seconds
......@@ -224,17 +224,9 @@ pdf_document_dispose (GObject *object)
pdf_document->annots = NULL;
if (pdf_document->document) {
g_object_unref (pdf_document->document);
if (pdf_document->font_info) {
poppler_font_info_free (pdf_document->font_info);
if (pdf_document->fonts_iter) {
poppler_fonts_iter_free (pdf_document->fonts_iter);
g_clear_object (&pdf_document->document);
g_clear_pointer (&pdf_document->font_info, poppler_font_info_free);
g_clear_pointer (&pdf_document->fonts_iter, poppler_fonts_iter_free);
G_OBJECT_CLASS (pdf_document_parent_class)->dispose (object);
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