From 711ffce6d81613b11963103819806ce177087d97 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Tue, 23 May 2017 16:06:00 -0700 Subject: Check handle for nullptr Test: pass Bug: 37662706 Change-Id: I12ab30134c8c9d04f1020dc44788a63fd77a6570 --- dumpstate/DumpstateDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index 571d368..cb487aa 100644 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -111,7 +111,7 @@ static void fugu_dump_base64(int out_fd, const char *path) // 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(); } -- cgit v1.2.3