fall back to the primary client when CCECProcessor::HandleLogicalAddressLost() and...
[deb_libcec.git] / src / lib / CECProcessor.cpp
index 50bb95fce849bedf025ef8cb990749580db3c843..54fea57f0cb4e4a7961c7677bff8e601dbdda2e9 100644 (file)
@@ -853,7 +853,7 @@ bool CCECProcessor::UnregisterClient(CCECClient *client)
 
 void CCECProcessor::UnregisterClients(void)
 {
-  m_libcec->AddLog(CEC_LOG_NOTICE, "unregistering all CEC clients");
+  m_libcec->AddLog(CEC_LOG_DEBUG, "unregistering all CEC clients");
 
   vector<CCECClient *> clients = m_libcec->GetClients();
   for (vector<CCECClient *>::iterator client = clients.begin(); client != clients.end(); client++)
@@ -933,6 +933,8 @@ void CCECProcessor::HandleLogicalAddressLost(cec_logical_address oldAddress)
 
   m_libcec->AddLog(CEC_LOG_NOTICE, "logical address %x was taken by another device, allocating a new address", oldAddress);
   CCECClient* client = GetClient(oldAddress);
+  if (!client)
+    client = GetPrimaryClient();
   if (client)
   {
     if (m_addrAllocator)