From 9343b35b6992ee5087826a858ce169d2efcd480c Mon Sep 17 00:00:00 2001 From: bidsharma Date: Thu, 2 Jun 2022 16:56:34 +0000 Subject: RFComm: Check for nullptr in PORT_IsOpening logs Test: gd/cert/run Bug: 233984469 Tag: #refactor Ignore-AOSP-First: Adding the change to aosp separately Change-Id: I3e892ed2ae0ae78a98a02df8cb24efd3a0826090 --- system/stack/rfcomm/port_api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/stack/rfcomm/port_api.cc') diff --git a/system/stack/rfcomm/port_api.cc b/system/stack/rfcomm/port_api.cc index 56b0fd1d0f..cca0f05310 100644 --- a/system/stack/rfcomm/port_api.cc +++ b/system/stack/rfcomm/port_api.cc @@ -516,7 +516,7 @@ bool PORT_IsOpening(RawAddress* bd_addr) { } LOG_INFO("RFC_MX_STATE_CONNECTED, found_port=%d, tRFC_PORT_STATE=%d", - found_port, p_port->rfc.state); + found_port, p_port != nullptr ? p_port->rfc.state : 0); if ((!found_port) || (found_port && (p_port->rfc.state < RFC_STATE_OPENED))) { /* Port is not established yet. */ -- cgit v1.2.3