Fix running without fifo console

This commit is contained in:
def 2015-05-07 17:14:03 +02:00
parent 9dc63ed429
commit 5988162b30

View file

@ -16,9 +16,12 @@ static volatile bool gs_stopFifoThread = false;
FifoConsole::FifoConsole(IConsole *pConsole, char *pFifoFile, int flag) FifoConsole::FifoConsole(IConsole *pConsole, char *pFifoFile, int flag)
{ {
m_pFifoFile = pFifoFile;
if(m_pFifoFile[0] == '\0')
return;
m_pFifoThread = thread_init(ListenFifoThread, this); m_pFifoThread = thread_init(ListenFifoThread, this);
m_pConsole = pConsole; m_pConsole = pConsole;
m_pFifoFile = pFifoFile;
m_flag = flag; m_flag = flag;
gs_stopFifoThread = false; gs_stopFifoThread = false;
@ -30,6 +33,9 @@ FifoConsole::FifoConsole(IConsole *pConsole, char *pFifoFile, int flag)
FifoConsole::~FifoConsole() FifoConsole::~FifoConsole()
{ {
if(m_pFifoFile[0] == '\0')
return;
lock_wait(gs_FifoLock); lock_wait(gs_FifoLock);
gs_stopFifoThread = true; gs_stopFifoThread = true;
lock_unlock(gs_FifoLock); lock_unlock(gs_FifoLock);