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.
This commit is contained in:
Colin Walters 2015-04-20 21:02:25 -04:00
parent f08cb802ea
commit 6d84321a16

View File

@ -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;