Skip to content

Commit 05c3676

Browse files
authored
coverity fix for _instance dereference
1 parent f80bf13 commit 05c3676

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

HdmiCecSource/HdmiCecSourceImplementation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,8 @@ namespace WPEFramework
750750

751751
if(!HdmiCecSourceImplementation::_instance || !_instance->cecEnableStatus)
752752
{
753-
LOGINFO("HdmiCecSourceImplementation::OnDisplayHDMIHotPlug failed _instance:%p cecEnableStatus:%d \r\n", HdmiCecSourceImplementation::_instance, _instance->cecEnableStatus);
753+
bool cecEnableStatus = _instance ? _instance->cecEnableStatus : false;
754+
LOGINFO("HdmiCecSourceImplementation::OnDisplayHDMIHotPlug failed _instance:%p cecEnableStatus:%d \r\n", HdmiCecSourceImplementation::_instance, cecEnableStatus);
754755
return;
755756
}
756757

0 commit comments

Comments
 (0)