Skip to content
Snippets Groups Projects
Commit 02fe58d1 authored by Raul Silvera's avatar Raul Silvera
Browse files

Propagate grpc_google_default_credentials_create errors

parent 79c7f85b
Branches
Tags
No related merge requests found
......@@ -47,7 +47,8 @@ grpc_credentials *Credentials::GetRawCreds() { return creds_; }
std::unique_ptr<Credentials> CredentialsFactory::GoogleDefaultCredentials() {
grpc_credentials *c_creds = grpc_google_default_credentials_create();
std::unique_ptr<Credentials> cpp_creds(new Credentials(c_creds));
std::unique_ptr<Credentials> cpp_creds(
c_creds == nullptr ? nullptr : new Credentials(c_creds));
return cpp_creds;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment