Commit 8d609ecf authored by Jehan's avatar Jehan

plug-ins: use global gegl_init() in file-pdf-load run() function.

As noted by Mitch, this is simpler and what we do in other plug-ins.

(cherry picked from commit ef3c13c6)
parent 8164d7f2
......@@ -382,6 +382,7 @@ run (const gchar *name,
GError *error = NULL;
INIT_I18N ();
gegl_init (NULL, NULL);
*nreturn_vals = 1;
*return_vals = values;
......@@ -660,6 +661,8 @@ run (const gchar *name,
}
values[0].data.d_status = status;
gegl_exit ();
}
static PopplerDocument*
......@@ -935,17 +938,10 @@ layer_from_surface (gint32 image,
{
gint32 layer;
/* This may have already been run for the interactive code path,
* as part of gimp_ui_init(), but it doesn't hurt to init again
* (needed for non-interactive calls too), as long as we match the
* exit.
*/
babl_init ();
layer = gimp_layer_new_from_surface (image, layer_name, surface,
progress_start,
progress_start + progress_scale);
gimp_image_insert_layer (image, layer, -1, position);
babl_exit ();
return layer;
}
......
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