summaryrefslogtreecommitdiff
path: root/gtk/gtkprintoperation.c
diff options
context:
space:
mode:
authorРуслан Ижбулатов <lrn1986@gmail.com>2014-07-25 23:33:06 +0000
committerРуслан Ижбулатов <lrn1986@gmail.com>2014-08-01 04:44:46 +0000
commite934ddd4988e093cb2485b2dbfa2c22551639b0c (patch)
tree76e7e049608946327aafd4d1b2a7c3c7a11b1fac /gtk/gtkprintoperation.c
parent1752ccaa1999dae55013e3db830286df1b121b8d (diff)
downloadgtk+-e934ddd4988e093cb2485b2dbfa2c22551639b0c.tar.gz
Ensure that print operation is alive until we're done
https://bugzilla.gnome.org/show_bug.cgi?id=733767
Diffstat (limited to 'gtk/gtkprintoperation.c')
-rw-r--r--gtk/gtkprintoperation.c4
1 files changed, 4 insertions, 0 deletions
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;
}