that was embarassing

This commit is contained in:
Akash Mozumdar 2018-10-09 02:22:59 -04:00
parent 967f75a5ec
commit 59be83eee8

View File

@ -27,6 +27,7 @@ void TextThread::Flush()
std::wstring sentence; std::wstring sentence;
{ {
LOCK(ttMutex); LOCK(ttMutex);
if (buffer.size() == 0) return;
if (buffer.size() < maxBufferSize && GetTickCount() - timestamp < flushDelay) return; if (buffer.size() < maxBufferSize && GetTickCount() - timestamp < flushDelay) return;
sentence = buffer; sentence = buffer;
buffer.clear(); buffer.clear();