mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix running without fifo console
This commit is contained in:
parent
9dc63ed429
commit
5988162b30
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue