cec: fixed - null ptr deref after 'cec-client -l'
[deb_libcec.git] / 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 */