diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-05-25 17:22:55 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-05-25 17:22:55 +0000 |
commit | cb18766ac587c9326ae5ce82bae0a3d3562977a7 (patch) | |
tree | 92b8d1778ba445d851cc18842df801b6f2be443a /gtk/gtkprintoperation-unix.c | |
parent | d2d30dcea14d8b68215408a58db657d8ebd35905 (diff) | |
download | gtk+-cb18766ac587c9326ae5ce82bae0a3d3562977a7.tar.gz |
Hold a refence on the print operation until gtk_print_job_send() is done.
2007-05-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprintoperation-unix.c (unix_end_run): Hold a
refence on the print operation until gtk_print_job_send()
is done. (#440040, Chris Vine)
svn path=/trunk/; revision=17915
Diffstat (limited to 'gtk/gtkprintoperation-unix.c')
-rw-r--r-- | gtk/gtkprintoperation-unix.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c index e76313ac74..be784380f8 100644 --- a/gtk/gtkprintoperation-unix.c +++ b/gtk/gtkprintoperation-unix.c @@ -268,9 +268,8 @@ unix_finish_send (GtkPrintJob *job, gpointer user_data, GError *error) { - GtkPrintOperationUnix *op_unix; - - op_unix = (GtkPrintOperationUnix *) user_data; + GtkPrintOperation *op = (GtkPrintOperation *) user_data; + GtkPrintOperationUnix *op_unix = op->priv->platform_data; if (error != NULL) { @@ -293,6 +292,8 @@ unix_finish_send (GtkPrintJob *job, if (op_unix->loop) g_main_loop_quit (op_unix->loop); + + g_object_unref (op); } static void @@ -312,9 +313,12 @@ unix_end_run (GtkPrintOperation *op, /* TODO: Check for error */ if (op_unix->job != NULL) - gtk_print_job_send (op_unix->job, - unix_finish_send, - op_unix, NULL); + { + g_object_ref (op); + gtk_print_job_send (op_unix->job, + unix_finish_send, + op, NULL); + } if (wait) { |