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

This commit is contained in:
Colin Walters 2015-06-01 18:40:04 -04:00
parent 9acb6283d1
commit acf1caa12f
1 changed files with 1 additions and 2 deletions

View File

@ -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)
{