mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Ensure that print operation is alive until we're done
https://bugzilla.gnome.org/show_bug.cgi?id=733767
This commit is contained in:
parent
1752ccaa19
commit
e934ddd498
@ -3239,6 +3239,9 @@ gtk_print_operation_run (GtkPrintOperation *op,
|
||||
&do_print);
|
||||
}
|
||||
|
||||
/* To ensure that priv is still valid after print_pages () */
|
||||
g_object_ref (op);
|
||||
|
||||
if (run_print_pages)
|
||||
print_pages (op, parent, do_print, result);
|
||||
|
||||
@ -3250,6 +3253,7 @@ gtk_print_operation_run (GtkPrintOperation *op,
|
||||
else if (priv->cancelled)
|
||||
result = GTK_PRINT_OPERATION_RESULT_CANCEL;
|
||||
|
||||
g_object_unref (op);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user