From e934ddd4988e093cb2485b2dbfa2c22551639b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Fri, 25 Jul 2014 23:33:06 +0000 Subject: Ensure that print operation is alive until we're done https://bugzilla.gnome.org/show_bug.cgi?id=733767 --- gtk/gtkprintoperation.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gtk/gtkprintoperation.c') diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c index 885c611770..d13f6bc89a 100644 --- a/gtk/gtkprintoperation.c +++ b/gtk/gtkprintoperation.c @@ -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; } -- cgit v1.2.1