From b999a785f2c8496e95b528c3dee901a0ffe32bbd Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 5 Jul 2018 09:36:54 +0200 Subject: [PATCH] flatpak_dir_deploy_appstream: Handle the no-local-commit exists case For some reason I hit this with a test remote, and it crashes. Make it return an error instead. Closes: #1854 Approved by: alexlarsson --- common/flatpak-dir.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index d6b2ea01..6ccc78c4 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -2170,6 +2170,9 @@ flatpak_dir_deploy_appstream (FlatpakDir *self, else do_compress = TRUE; + if (new_checksum == NULL) + return flatpak_fail (error, "No appstream commit to deploy"); + real_checkout_dir = g_file_get_child (arch_dir, new_checksum); checkout_exists = g_file_query_exists (real_checkout_dir, NULL);