[webkit-gtk] webkit_print_operation_run_print_dialog

Michael Catanzaro mcatanzaro at igalia.com
Sun Mar 5 14:17:45 PST 2017

On Sun, 2017-03-05 at 11:39 -0800, John Ralls wrote:
> Is webkit_print_operation_run_dialog() supposed to free the
> WebKitPrintOperation* passed in? 

I hope not. That would be very unexpected to me.

> If it is, could you please annotate it accordingly in the docs?
> I ask because
>     op = webkit_print_operation_new (WEBKIT_WEB_VIEW (self));
>     top = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (self)));
>     webkit_print_operation_run_dialog (op, top);
>     g_free (op); 
> crashes in the g_free on F25/libwebkit2gtk-4.0.so.37.14.9.

You need to use g_object_unref(), not g_free().


More information about the webkit-gtk mailing list