mirror of
https://github.com/flatpak/flatpak.git
synced 2026-02-01 11:31:21 -05:00
Don't return NULL without setting an error
Set the expected error when returning NULL from flatpak_dir_get_config due to an empty repo. Closes: #2576 Closes: #2577 Approved by: mwleeds
This commit is contained in:
committed by
Atomic Bot
parent
c9e40c8f03
commit
4f6fef6d82
@@ -2676,7 +2676,11 @@ flatpak_dir_get_config (FlatpakDir *self,
|
||||
return NULL;
|
||||
|
||||
if (self->repo == NULL)
|
||||
return NULL;
|
||||
{
|
||||
g_set_error (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND,
|
||||
_("The config key %s is not set"), key);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
config = ostree_repo_get_config (self->repo);
|
||||
ostree_key = g_strconcat ("xa.", key, NULL);
|
||||
|
||||
Reference in New Issue
Block a user