diff options
author | Noah Eisen <ncteisen@google.com> | 2017-11-21 12:19:37 -0800 |
---|---|---|
committer | ncteisen <ncteisen@gmail.com> | 2017-12-04 12:45:15 -0800 |
commit | 0d7f5e77c0ca60fd715e00f98b705c99fba2c097 (patch) | |
tree | 3b651b230d03d0150a12b1adc61c6cfa5e1050da /include/grpc++ | |
parent | 74c106eff3d1a43ee9e4823c9dfdd28540591ec1 (diff) |
No null string ctor
Diffstat (limited to 'include/grpc++')
-rw-r--r-- | include/grpc++/impl/codegen/call.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index 6a2ac8b70c..4c2e550473 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -588,10 +588,12 @@ class CallOpClientRecvStatus { binary_error_details = grpc::string(iter->second.begin(), iter->second.length()); } - *recv_status_ = Status(static_cast<StatusCode>(status_code_), - grpc::string(GRPC_SLICE_START_PTR(error_message_), - GRPC_SLICE_END_PTR(error_message_)), - binary_error_details, grpc::string(error_string_)); + *recv_status_ = + Status(static_cast<StatusCode>(status_code_), + grpc::string(GRPC_SLICE_START_PTR(error_message_), + GRPC_SLICE_END_PTR(error_message_)), + binary_error_details, + error_string_ != nullptr ? grpc::string(error_string_) : ""); g_core_codegen_interface->grpc_slice_unref(error_message_); g_core_codegen_interface->gpr_free((void*)error_string_); recv_status_ = nullptr; |