summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Hewitt <davidmhewitt@users.noreply.github.com>2017-08-01 18:45:32 +0100
committerRichard Hughes <richard@hughsie.com>2017-08-01 19:46:06 +0100
commitebc7e4afee7d307e144203c5769791fd9da9b318 (patch)
tree4329713708c224c3923dd039abf5b2065582ce83 /lib
parenta7c20659448eff1ff3615f2c1e8659d411a2a943 (diff)
Add missing context pushes and pops
Noticed a push without a pop and vice versa.
Diffstat (limited to 'lib')
-rw-r--r--lib/packagekit-glib2/pk-client-sync.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/packagekit-glib2/pk-client-sync.c b/lib/packagekit-glib2/pk-client-sync.c
index 165543e5c..a6b1a4b4a 100644
--- a/lib/packagekit-glib2/pk-client-sync.c
+++ b/lib/packagekit-glib2/pk-client-sync.c
@@ -1070,6 +1070,8 @@ pk_client_get_categories (PkClient *client, GCancellable *cancellable,
helper.loop = g_main_loop_new (helper.context, FALSE);
helper.error = error;
+ g_main_context_push_thread_default (helper.context);
+
/* run async method */
pk_client_get_categories_async (client, cancellable, progress_callback, progress_user_data,
(GAsyncReadyCallback) pk_client_generic_finish_sync, &helper);
@@ -1440,6 +1442,8 @@ pk_client_install_files (PkClient *client,
results = helper.results;
+ g_main_context_pop_thread_default (helper.context);
+
/* free temp object */
g_main_loop_unref (helper.loop);
g_main_context_unref (helper.context);