aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Vrátil <dvratil@redhat.com>2012-05-17 01:05:38 +0800
committerDan Vrátil <dvratil@redhat.com>2012-05-17 01:05:38 +0800
commitde8c6c1bdc0f70e13f9d5e1212b783641b633df0 (patch)
treeec5e2f662ad1600b65cfc332071dcba2b5c4bcb7
parentf14af6f9988ec850e5da566657163fdcdb22aeaf (diff)
downloadgsoc2013-evolution-de8c6c1bdc0f70e13f9d5e1212b783641b633df0.tar
gsoc2013-evolution-de8c6c1bdc0f70e13f9d5e1212b783641b633df0.tar.gz
gsoc2013-evolution-de8c6c1bdc0f70e13f9d5e1212b783641b633df0.tar.bz2
gsoc2013-evolution-de8c6c1bdc0f70e13f9d5e1212b783641b633df0.tar.lz
gsoc2013-evolution-de8c6c1bdc0f70e13f9d5e1212b783641b633df0.tar.xz
gsoc2013-evolution-de8c6c1bdc0f70e13f9d5e1212b783641b633df0.tar.zst
gsoc2013-evolution-de8c6c1bdc0f70e13f9d5e1212b783641b633df0.zip
Bug #673514 - Crash in WebKit after printing
-rw-r--r--mail/e-mail-reader-utils.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c
index afc7e3748c..0a8e358938 100644
--- a/mail/e-mail-reader-utils.c
+++ b/mail/e-mail-reader-utils.c
@@ -491,10 +491,15 @@ printing_done_cb (EMailPrinter *printer,
/* Set activity as completed, and keep it displayed for a few seconds
* so that user can actually see the the printing was sucesfully finished. */
e_activity_set_state (activity, E_ACTIVITY_COMPLETED);
+
+ /* We can't destroy the printer and associated WebKitWebView directly from
+ * here, because this callback is a handler of a WebKit's signal. This
+ * will destroy the printer later, together with the activity */
+ g_object_set_data_full (G_OBJECT (activity),
+ "printer", printer, (GDestroyNotify) g_object_unref);
+
g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, 3,
(GSourceFunc) destroy_printing_activity, activity, NULL);
-
- g_object_unref (printer);
}
void