Backport missing null check in "adb get-state".

Bug: https://code.google.com/p/android/issues/detail?id=184011
Bug: http://b/23709037
Change-Id: Ia33814bd2adc310c2471cd6a12b9a73f27d77182
This commit is contained in:
Elliott Hughes 2015-09-01 12:54:21 -07:00
parent 46603db57a
commit 5b65f86a2f
1 changed files with 1 additions and 1 deletions

View File

@ -919,7 +919,7 @@ int handle_host_request(char *service, transport_type ttype, char* serial, int r
if(!strncmp(service,"get-state",strlen("get-state"))) {
transport = acquire_one_transport(CS_ANY, ttype, serial, NULL);
SendOkay(reply_fd);
SendProtocolString(reply_fd, transport->connection_state_name());
SendProtocolString(reply_fd, transport ? transport->connection_state_name() : "unknown");
return 0;
}
#endif // ADB_HOST