[gtk+] Ensure that print operation is alive until we're done
- From: Руслан Ижбулатов <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Ensure that print operation is alive until we're done
- Date: Fri, 1 Aug 2014 04:45:45 +0000 (UTC)
commit e934ddd4988e093cb2485b2dbfa2c22551639b0c
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Fri Jul 25 23:33:06 2014 +0000
Ensure that print operation is alive until we're done
https://bugzilla.gnome.org/show_bug.cgi?id=733767
gtk/gtkprintoperation.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c
index 885c611..d13f6bc 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]