rpi: only notify libCEC that we lost our LA when the connection was initialised
authorLars Op den Kamp <lars@opdenkamp.eu>
Wed, 5 Sep 2012 13:07:02 +0000 (15:07 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Wed, 5 Sep 2012 13:07:59 +0000 (15:07 +0200)
src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp

index 79d73ba323562c9aae47f53deab0b287bb2c9f11..5d13368e50a3c569667ab0b812ed3d824b534c50 100644 (file)
@@ -194,7 +194,9 @@ void CRPiCECAdapterCommunication::OnDataReceived(uint32_t header, uint32_t p0, u
       cec_logical_address previousAddress = m_logicalAddress;
       m_logicalAddress = CECDEVICE_UNKNOWN;
 
-      m_callback->HandleLogicalAddressLost(previousAddress);
+      // notify libCEC that we lost our LA when the connection was initialised
+      if (m_bInitialised)
+        m_callback->HandleLogicalAddressLost(previousAddress);
     }
     break;
   case VC_CEC_TOPOLOGY: