Commit 8f716bd9 authored by Locatelli's avatar Locatelli
Browse files

set NULL to m_serverthread in the constructor

parent 0b029aea
...@@ -53,6 +53,8 @@ StereoWatchdogController::StereoWatchdogController(const string& name) :Experime ...@@ -53,6 +53,8 @@ StereoWatchdogController::StereoWatchdogController(const string& name) :Experime
m_Level2Driver.init(this, "level2driver"); m_Level2Driver.init(this, "level2driver");
registerFunction(TYPE); registerFunction(TYPE);
m_serverThread = NULL;
} }
...@@ -77,8 +79,10 @@ StereoWatchdogController::StereoWatchdogController(const StereoWatchdogControlle ...@@ -77,8 +79,10 @@ StereoWatchdogController::StereoWatchdogController(const StereoWatchdogControlle
* Destructor * Destructor
*/ */
StereoWatchdogController::~StereoWatchdogController() { StereoWatchdogController::~StereoWatchdogController() {
m_serverThread->join(); if (m_serverThread != NULL) {
delete m_serverThread; m_serverThread->join();
delete m_serverThread;
}
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment