mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-25 01:34:34 +03:00
pull: ref the thread default main context during init, unref in cleanup
...get_thread_default returns NULL when the thread default is also the global default, so this only shows up when running in a thread (eg g_task_run_in_thread)
This commit is contained in:
parent
3ff4b1874c
commit
f802822034
@ -1148,7 +1148,7 @@ ostree_repo_pull (OstreeRepo *self,
|
||||
guint64 end_time;
|
||||
|
||||
pull_data->async_error = error;
|
||||
pull_data->main_context = g_main_context_get_thread_default ();
|
||||
pull_data->main_context = g_main_context_ref_thread_default ();
|
||||
pull_data->loop = g_main_loop_new (pull_data->main_context, FALSE);
|
||||
pull_data->flags = flags;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user