From 6e8f5ea63974393095d5b8d44360e925dacefb90 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Tue, 23 May 2017 16:06:03 -0700 Subject: [PATCH] Check handle for nullptr Test: pass Bug: 37662706 Change-Id: Ie3ad92a5dc71eeea9aa9a26f0a6f94ae7aca3433 --- dumpstate/DumpstateDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index 230f4f22..6ba67289 100755 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -124,7 +124,7 @@ static void getModemLogs(int fd) // Methods from ::android::hardware::dumpstate::V1_0::IDumpstateDevice follow. Return DumpstateDevice::dumpstateBoard(const hidl_handle& handle) { - if (handle->numFds < 1) { + if (handle == nullptr || handle->numFds < 1) { ALOGE("no FDs\n"); return Void(); }