From: Lars Op den Kamp Date: Wed, 11 Apr 2012 14:29:15 +0000 (+0200) Subject: cec: fixed possible crash when trying to request a vendor id of a device when the... X-Git-Tag: upstream/2.2.0~1^2~31^2~12 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=63b566782198773b401502b4db40d24caed0cfc9;p=deb_libcec.git cec: fixed possible crash when trying to request a vendor id of a device when the address of libCEC isn't known yet. bugzid: 654 --- diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index ab1d710..5b9d421 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -372,7 +372,7 @@ bool CCECBusDevice::RequestVendorId(void) { bool bReturn(false); - if (!MyLogicalAddressContains(m_iLogicalAddress)) + if (!MyLogicalAddressContains(m_iLogicalAddress) && GetMyLogicalAddress() != CECDEVICE_UNKNOWN) { MarkBusy(); CLibCEC::AddLog(CEC_LOG_NOTICE, "<< requesting vendor ID of '%s' (%X)", GetLogicalAddressName(), m_iLogicalAddress);