diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c index ac2c13d7cb..71cf634668 100644 --- a/src/libostree/ostree-sysroot.c +++ b/src/libostree/ostree-sysroot.c @@ -1745,10 +1745,8 @@ ostree_sysroot_simple_write_deployment (OstreeSysroot *sysroot, /* tracks current versioned deployment */ OstreeRepo *repo = ostree_sysroot_repo (sysroot); - OstreeDeployment *versioned = booted_deployment ? booted_deployment : merge_deployment; - const gchar *last_version = NULL; - if (versioned) - last_version = _ostree_deployment_get_version (versioned, repo, error); + const gchar *last_version = + _ostree_deployment_get_version (new_deployment, repo, error); /* tracks when we come across the booted deployment */ gboolean before_booted = TRUE;