From 0fd09789871d1d7dcffa14615bbaf48e09708d30 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 16 Jan 2017 11:20:47 +0100 Subject: [PATCH] Fix test crash introduced with error message --- app/flatpak-transaction.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/flatpak-transaction.c b/app/flatpak-transaction.c index f05b31a1..46547b92 100644 --- a/app/flatpak-transaction.c +++ b/app/flatpak-transaction.c @@ -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)