We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91288c8 commit 2d20fc7Copy full SHA for 2d20fc7
auth/src/desktop/rpcs/auth_response.cc
@@ -23,7 +23,7 @@ AuthError AuthResponse::error_code() const {
23
if (IsSuccessful()) {
24
return kAuthErrorNone;
25
}
26
- if (!application_data_->error) {
+ if (!application_data_ || !application_data_->error) {
27
return kAuthErrorFailure;
28
29
auth/src/desktop/rpcs/auth_response.h
@@ -40,8 +40,10 @@ class AuthResponse
40
bool IsSuccessful() const;
41
42
std::string error_message() const {
43
- return application_data_->error ? application_data_->error->message
44
- : std::string();
+ if (application_data_ && application_data_->error)
+ return application_data_->error->message;
45
+ else
46
+ return std::string();
47
48
};
49
0 commit comments