diff options
author | Руслан Ижбулатов <lrn1986@gmail.com> | 2014-07-25 23:33:06 +0000 |
---|---|---|
committer | Руслан Ижбулатов <lrn1986@gmail.com> | 2014-08-01 04:44:46 +0000 |
commit | e934ddd4988e093cb2485b2dbfa2c22551639b0c (patch) | |
tree | 76e7e049608946327aafd4d1b2a7c3c7a11b1fac /gtk/gtkprintoperation.c | |
parent | 1752ccaa1999dae55013e3db830286df1b121b8d (diff) | |
download | gtk+-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.c | 4 |
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; } |