Skip to content

Commit

Permalink
Merge pull request grpc#923 from rauls5382/master
Browse files Browse the repository at this point in the history
Propagate grpc_google_default_credentials_create errors
  • Loading branch information
yang-g committed Mar 3, 2015
2 parents ba4a105 + 02fe58d commit 0cfc638
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cpp/client/credentials.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0cfc638

Please sign in to comment.