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:
parent
46603db57a
commit
5b65f86a2f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue