cec: fix crash on exit after GetDeviceInformation()
authorLars Op den Kamp <lars@opdenkamp.eu>
Fri, 23 Mar 2012 16:01:36 +0000 (17:01 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Fri, 23 Mar 2012 16:01:36 +0000 (17:01 +0100)
src/lib/CECProcessor.cpp
src/testclient/main.cpp

index 4685132619bba76bc243da41281dd9ab1c88b4fb..6e5bf19f6f7880609c033433866b85befbc0f469 100644 (file)
@@ -1692,5 +1692,6 @@ bool CCECProcessor::GetDeviceInformation(const char *strPort, libcec_configurati
   config->iPhysicalAddress = m_communication->GetPhysicalAddress();
 
   delete m_communication;
+  m_communication = NULL;
   return true;
 }
index c9a74d7b0364eac3162a9d7ca12fc09af97e0da2..d4c0ed9e7a1e6406c7d98799a84101f39554fc1f 100644 (file)
@@ -207,8 +207,8 @@ void ListDevices(ICECAdapter *parser)
         PrintToStdOut("WARNING: unable to open the device on port %s", devices[iDevicePtr].comm);
       else
         strDeviceInfo.AppendFormat("firmware version:   %d\n", config.iFirmwareVersion);
+      strDeviceInfo.append("\n");
     }
-
     PrintToStdOut(strDeviceInfo.c_str());
   }
 }