From 8481d927f7379d7485ce1c5b2409c73857644bbe Mon Sep 17 00:00:00 2001 From: John Ellson Date: Tue, 9 Jul 2013 08:55:50 -0400 Subject: [PATCH] make it compile, even if not complete --- plugin/poppler/gvloadimage_poppler.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugin/poppler/gvloadimage_poppler.c b/plugin/poppler/gvloadimage_poppler.c index 297f88402..ef69faa32 100644 --- a/plugin/poppler/gvloadimage_poppler.c +++ b/plugin/poppler/gvloadimage_poppler.c @@ -57,6 +57,7 @@ static PopplerDocument* gvloadimage_poppler_load(GVJ_t * job, usershape_t *us) else { us->datafree(us); /* free incompatible cache data */ us->data = NULL; + us->datafree = NULL; } } @@ -67,11 +68,11 @@ static PopplerDocument* gvloadimage_poppler_load(GVJ_t * job, usershape_t *us) switch (us->type) { case FT_PDF: - if (g_path_is_absolute(pdf_file)) { - absolute = g_strdup (pdf_file); + if (g_path_is_absolute(us->name)) { + absolute = g_strdup (us->name); } else { gchar *dir = g_get_current_dir (); - absolute = g_build_filename (dir, pdf_file, (gchar *) 0); + absolute = g_build_filename (dir, us->name, (gchar *) 0); free (dir); } @@ -112,7 +113,7 @@ static void gvloadimage_poppler_cairo(GVJ_t * job, usershape_t *us, boxf b, bool PopplerDocument* document = gvloadimage_poppler_load(job, us); cairo_t *cr = (cairo_t *) job->context; /* target context */ - cairo_surface_t *surface; /* source surface */ + cairo_surface_t *surface = NULL; /* source surface */ if (document) { cairo_save(cr); -- 2.40.0