diff options
| author | 2014-08-28 17:16:05 +0000 | |
|---|---|---|
| committer | 2014-08-28 17:16:06 +0000 | |
| commit | 83c115930b403db2b6b38d9dcb4828e31feb792f (patch) | |
| tree | 8a88c26dbe4a52b8b69a3368ba16c5426b915b23 | |
| parent | aad269d708cb1dd18fe3a319a862f91f01696435 (diff) | |
| parent | 60ed7da4d193e0f90b05c4236af77d3b276c0ea4 (diff) | |
Merge "Avoid null pointer dereference when sending JDWP packets"
| -rw-r--r-- | runtime/jdwp/jdwp_main.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/jdwp/jdwp_main.cc b/runtime/jdwp/jdwp_main.cc index 4155c82699..a4f427ca29 100644 --- a/runtime/jdwp/jdwp_main.cc +++ b/runtime/jdwp/jdwp_main.cc @@ -143,7 +143,7 @@ bool JdwpState::IsConnected() { } void JdwpState::SendBufferedRequest(uint32_t type, const std::vector<iovec>& iov) { - if (netState->clientSock < 0) { + if (!IsConnected()) { // Can happen with some DDMS events. VLOG(jdwp) << "Not sending JDWP packet: no debugger attached!"; return; @@ -167,7 +167,7 @@ void JdwpState::SendBufferedRequest(uint32_t type, const std::vector<iovec>& iov } void JdwpState::SendRequest(ExpandBuf* pReq) { - if (netState->clientSock < 0) { + if (!IsConnected()) { // Can happen with some DDMS events. VLOG(jdwp) << "Not sending JDWP packet: no debugger attached!"; return; |