cec: don't send an active source command when the physical address couldn't be set...
authorLars Op den Kamp <lars@opdenkamp.eu>
Tue, 3 Apr 2012 12:33:21 +0000 (14:33 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Tue, 3 Apr 2012 12:33:21 +0000 (14:33 +0200)
src/lib/CECProcessor.cpp

index 59a537f63c78c38c922106808a7c0f1ed26c317a..ee95cce720490d3fac40b013b077a7c2620e293a 100644 (file)
@@ -253,7 +253,7 @@ bool CCECProcessor::Initialise(void)
   else if (m_configuration.iPhysicalAddress == 0 && (bReturn = SetHDMIPort(m_configuration.baseDevice, m_configuration.iHDMIPort, true)) == false)
     CLibCEC::AddLog(CEC_LOG_ERROR, "unable to set HDMI port %d on %s (%x)", m_configuration.iHDMIPort, ToString(m_configuration.baseDevice), (uint8_t)m_configuration.baseDevice);
 
-  if (m_configuration.bActivateSource == 1)
+  if (bReturn && m_configuration.bActivateSource == 1)
     m_busDevices[m_configuration.logicalAddresses.primary]->ActivateSource();
 
   SetInitialised(bReturn);