[ostree] repo: Don't crash when creating a summary if we have --empty deltas



commit acf1caa12f9e35f3bcac2fd80b97e8e647de26df
Author: Colin Walters <walters verbum org>
Date:   Mon Jun 1 18:40:04 2015 -0400

    repo: Don't crash when creating a summary if we have --empty deltas

 src/libostree/ostree-repo.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index b141049..6a20336 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -4030,8 +4030,7 @@ ostree_repo_regenerate_summary (OstreeRepo     *self,
         g_autoptr(GInputStream) in_stream = NULL;
 
         _ostree_parse_delta_name (delta_names->pdata[i], &from, &to);
-        superblock = _ostree_get_relative_static_delta_superblock_path (from[0] ? from : NULL,
-                                                                        to);
+        superblock = _ostree_get_relative_static_delta_superblock_path ((from && from[0]) ? from : NULL, to);
         superblock_file_fd = openat (self->repo_dir_fd, superblock, O_RDONLY | O_CLOEXEC);
         if (superblock_file_fd == -1)
           {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]