diff options
| author | Steven Moreland <smoreland@google.com> | 2017-05-23 16:06:01 -0700 |
|---|---|---|
| committer | Steven Moreland <smoreland@google.com> | 2017-05-23 16:12:31 -0700 |
| commit | e7d746ce24571fe713e3677c6d998058d5a6a67b (patch) | |
| tree | 14f961b782654a34b3e871e1e6f024ad114457c5 /dumpstate | |
| parent | 804880c5520db46ecfb1353e1b2bce7b70b3a51c (diff) | |
Check handle for nullptr
Test: pass
Bug: 37662706
Change-Id: I1a1aab951df43be955812eca1f032cb88f721598
Diffstat (limited to 'dumpstate')
| -rwxr-xr-x | dumpstate/DumpstateDevice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index 906107a..e68d7e8 100755 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -94,7 +94,7 @@ static void getModemLogs(int fd) // Methods from ::android::hardware::dumpstate::V1_0::IDumpstateDevice follow. Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) { - if (handle->numFds < 1) { + if (handle == nullptr || handle->numFds < 1) { ALOGE("no FDs\n"); return Void(); } |
