[webkit-gtk] webkit_print_operation_run_print_dialog
John Ralls
jralls at ceridwen.fremont.ca.us
Sun Mar 5 14:21:24 PST 2017
> On Mar 5, 2017, at 2:17 PM, Michael Catanzaro <mcatanzaro at igalia.com> wrote:
>
> 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().
Ah, thanks. A note to that effect in the docs would be helpful.
Regards,
John Ralls
More information about the webkit-gtk
mailing list