From 6d84321a16ec581269bee947bb6f6fceacc2f0c4 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 20 Apr 2015 21:02:25 -0400 Subject: [PATCH] status: Don't crash if we deployed a local refspec In the case we built a local tree, we'd pass `NULL` as a remote down to the GPG checking code. Noticed this in the test suite. --- src/ostree/ot-admin-builtin-status.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ostree/ot-admin-builtin-status.c b/src/ostree/ot-admin-builtin-status.c index c6597ab3..802aaa8e 100644 --- a/src/ostree/ot-admin-builtin-status.c +++ b/src/ostree/ot-admin-builtin-status.c @@ -74,7 +74,8 @@ deployment_get_gpg_verify (OstreeDeployment *deployment, if (!ostree_parse_refspec (refspec, &remote, NULL, NULL)) goto out; - (void) ostree_repo_remote_get_gpg_verify (repo, remote, &gpg_verify, NULL); + if (remote) + (void) ostree_repo_remote_get_gpg_verify (repo, remote, &gpg_verify, NULL); out: return gpg_verify;