aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/em-format.c
diff options
context:
space:
mode:
Diffstat (limited to 'em-format/em-format.c')
-rw-r--r--em-format/em-format.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/em-format/em-format.c b/em-format/em-format.c
index 6b08705d86..23b2fd6ba8 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -1996,7 +1996,7 @@ em_format_parse_async (EMFormat *emf,
GAsyncReadyCallback callback,
gpointer user_data)
{
- GSimpleAsyncResult *result;
+ GSimpleAsyncResult *simple;
g_return_if_fail (EM_IS_FORMAT (emf));
@@ -2023,10 +2023,15 @@ em_format_parse_async (EMFormat *emf,
}
- result = g_simple_async_result_new (G_OBJECT (emf), callback,
- user_data, em_format_parse_async);
- g_simple_async_result_run_in_thread (result, emf_start_async_parser,
- G_PRIORITY_DEFAULT, cancellable);
+ simple = g_simple_async_result_new (
+ G_OBJECT (emf), callback,
+ user_data, em_format_parse_async);
+
+ g_simple_async_result_set_check_cancellable (simple, cancellable);
+
+ g_simple_async_result_run_in_thread (
+ simple, emf_start_async_parser,
+ G_PRIORITY_DEFAULT, cancellable);
}
void