Fix test crash introduced with error message

This commit is contained in:
Alexander Larsson
2017-01-16 11:20:47 +01:00
parent da0970e290
commit 0fd0978987

View File

@@ -478,13 +478,15 @@ flatpak_transaction_add_ref (FlatpakTransaction *self,
}
}
if (metadata == NULL && remote != NULL &&
flatpak_dir_fetch_ref_cache (self->dir, remote, ref, NULL, NULL, &remote_metadata, NULL, &local_error))
metadata = remote_metadata;
else
if (metadata == NULL && remote != NULL)
{
g_print ("Warning: Can't find dependencies: %s\n", local_error->message);
g_clear_error (&local_error);
if (flatpak_dir_fetch_ref_cache (self->dir, remote, ref, NULL, NULL, &remote_metadata, NULL, &local_error))
metadata = remote_metadata;
else
{
g_print ("Warning: Can't find dependencies: %s\n", local_error->message);
g_clear_error (&local_error);
}
}
if (metadata)