libostree: Fix crash if output is not a tty

This was a recent regression.
This commit is contained in:
Colin Walters 2014-03-14 21:59:35 -04:00
parent cbc11f42e5
commit b6b7d37c9d
1 changed files with 4 additions and 1 deletions

View File

@ -1245,7 +1245,10 @@ ostree_repo_pull (OstreeRepo *self,
(guint64)(bytes_transferred / shift), (guint64)(bytes_transferred / shift),
shift == 1 ? "B" : "KiB", shift == 1 ? "B" : "KiB",
(guint) ((end_time - start_time) / G_USEC_PER_SEC)); (guint) ((end_time - start_time) / G_USEC_PER_SEC));
if (pull_data->progress)
ostree_async_progress_set_status (pull_data->progress, msg); ostree_async_progress_set_status (pull_data->progress, msg);
else
g_print ("%s\n", msg);
} }
ret = TRUE; ret = TRUE;