cec: fixed - null ptr deref after 'cec-client -l'
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 2 Aug 2012 17:22:20 +0000 (19:22 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 2 Aug 2012 17:22:20 +0000 (19:22 +0200)
src/lib/adapter/Pulse-Eight/USBCECAdapterCommunication.cpp

index b524dd8082f53bb120873ee44dfd318e0c40d14f..70e45ac6c30e00e06987cf9c001f67cf55c68028 100644 (file)
@@ -222,7 +222,8 @@ void CUSBCECAdapterCommunication::Close(void)
   m_adapterMessageQueue->Clear();
 
   /* stop and delete the write thread */
-  m_eepromWriteThread->Stop();
+  if (m_eepromWriteThread)
+    m_eepromWriteThread->Stop();
   DELETE_AND_NULL(m_eepromWriteThread);
 
   /* stop and delete the ping thread */