mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2024-12-22 20:58:52 +00:00
file-backend: avoid critical when cancellable is unset
In 0e205fce5f
I improperly assumed that
the cancellable would always be valid. Avoid criticals when it is NULL.
This commit is contained in:
parent
b814e464f6
commit
25e1e11c81
@ -581,6 +581,7 @@ secret_file_backend_real_init_async (GAsyncInitable *initable,
|
|||||||
init = g_new0 (InitClosure, 1);
|
init = g_new0 (InitClosure, 1);
|
||||||
init->io_priority = io_priority;
|
init->io_priority = io_priority;
|
||||||
init->file = file;
|
init->file = file;
|
||||||
|
if (cancellable)
|
||||||
init->cancellable = g_object_ref (cancellable);
|
init->cancellable = g_object_ref (cancellable);
|
||||||
g_task_set_task_data (task, init, init_closure_free);
|
g_task_set_task_data (task, init, init_closure_free);
|
||||||
g_bus_get (G_BUS_TYPE_SESSION, cancellable, on_bus_get, task);
|
g_bus_get (G_BUS_TYPE_SESSION, cancellable, on_bus_get, task);
|
||||||
|
Loading…
Reference in New Issue
Block a user