From b6b7d37c9d15f0211a39687fd72d9c7c350dfa2c Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 14 Mar 2014 21:59:35 -0400 Subject: [PATCH] libostree: Fix crash if output is not a tty This was a recent regression. --- src/libostree/ostree-repo-pull.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index 6776a2ae..194c4ade 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -1245,7 +1245,10 @@ ostree_repo_pull (OstreeRepo *self, (guint64)(bytes_transferred / shift), shift == 1 ? "B" : "KiB", (guint) ((end_time - start_time) / G_USEC_PER_SEC)); - ostree_async_progress_set_status (pull_data->progress, msg); + if (pull_data->progress) + ostree_async_progress_set_status (pull_data->progress, msg); + else + g_print ("%s\n", msg); } ret = TRUE;