Update: Fix crashed when updating runtimes

The debug spew were looking for the "current" ref, but there is
no such thing for runtimes, only apps.
This commit is contained in:
Alexander Larsson
2016-08-17 15:32:11 +02:00
parent 0d115fb2e7
commit 92d9d9e4dc

View File

@@ -122,11 +122,9 @@ do_update (FlatpakDir * dir,
}
else
{
g_autofree char *current = NULL;
g_autoptr(GVariant) deploy_data = NULL;
g_autofree char *commit = NULL;
current = flatpak_dir_current_ref (dir, parts[1], NULL);
deploy_data = flatpak_dir_get_deploy_data (dir, current, NULL, NULL);
deploy_data = flatpak_dir_get_deploy_data (dir, ref, NULL, NULL);
commit = g_strndup (flatpak_deploy_data_get_commit (deploy_data), 12);
g_print (_("Now at %s.\n"), commit);
}
@@ -180,11 +178,9 @@ do_update (FlatpakDir * dir,
}
else
{
g_autofree char *current = NULL;
g_autoptr(GVariant) deploy_data = NULL;
g_autofree char *commit = NULL;
current = flatpak_dir_current_ref (dir, parts[1], NULL);
deploy_data = flatpak_dir_get_deploy_data (dir, current, NULL, NULL);
deploy_data = flatpak_dir_get_deploy_data (dir, rel->ref, NULL, NULL);
commit = g_strndup (flatpak_deploy_data_get_commit (deploy_data), 12);
g_print (_("Now at %s.\n"), commit);
}