mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2025-01-05 03:28:54 +00:00
Fix critical assertion when secret_password_lookup_xx() returns null.
This commit is contained in:
parent
fda4704c56
commit
e202ac9d19
@ -552,6 +552,9 @@ secret_password_lookup_nonpageable_finish (GAsyncResult *result,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
closure = g_simple_async_result_get_op_res_gpointer (res);
|
closure = g_simple_async_result_get_op_res_gpointer (res);
|
||||||
|
if (closure->value == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
content_type = secret_value_get_content_type (closure->value);
|
content_type = secret_value_get_content_type (closure->value);
|
||||||
if (content_type && g_str_equal (content_type, "text/plain")) {
|
if (content_type && g_str_equal (content_type, "text/plain")) {
|
||||||
password = _secret_value_unref_to_password (closure->value);
|
password = _secret_value_unref_to_password (closure->value);
|
||||||
@ -589,6 +592,9 @@ secret_password_lookup_finish (GAsyncResult *result,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
closure = g_simple_async_result_get_op_res_gpointer (res);
|
closure = g_simple_async_result_get_op_res_gpointer (res);
|
||||||
|
if (closure->value == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
content_type = secret_value_get_content_type (closure->value);
|
content_type = secret_value_get_content_type (closure->value);
|
||||||
if (content_type && g_str_equal (content_type, "text/plain")) {
|
if (content_type && g_str_equal (content_type, "text/plain")) {
|
||||||
string = _secret_value_unref_to_string (closure->value);
|
string = _secret_value_unref_to_string (closure->value);
|
||||||
|
Loading…
Reference in New Issue
Block a user