commit | 34ace43a2dfb7b948779dd77bd7a6f195c0db43a | [log] [tgz] |
---|---|---|
author | Steven Moreland <smoreland@google.com> | Tue May 23 16:06:04 2017 -0700 |
committer | Steven Moreland <smoreland@google.com> | Tue May 23 16:12:34 2017 -0700 |
tree | 8de04c30e07aa3fc0ab9b13433163a1564918030 | |
parent | 7fdf7cfc1524453231906b67a7c6d91fc3ee3593 [diff] |
Check handle for nullptr Test: pass Bug: 37662706 Change-Id: Ia3ec4d8e512d18b679a9d6291a8dfdc0eb0cceec
diff --git a/dumpstate/1.0/default/DumpstateDevice.cpp b/dumpstate/1.0/default/DumpstateDevice.cpp index 213fc62..818a531 100644 --- a/dumpstate/1.0/default/DumpstateDevice.cpp +++ b/dumpstate/1.0/default/DumpstateDevice.cpp
@@ -37,7 +37,7 @@ // this interface - since HIDL_FETCH_IDumpstateDevice() is not defined, this function will never // be called by dumpstate. - if (handle->numFds < 1) { + if (handle == nullptr || handle->numFds < 1) { ALOGE("no FDs\n"); return Void(); }