Fixed a issue that Rainmeter crashes at LSLog(). (multithreading issue)

This commit is contained in:
spx
2010-09-19 09:21:25 +00:00
parent df146e4eb4
commit 704558b7df
6 changed files with 29 additions and 7 deletions

View File

@ -548,10 +548,9 @@ BOOL LSLog(int nLevel, LPCTSTR pszModule, LPCTSTR pszMessage)
break;
}
Rainmeter->m_LogData.push_front(logInfo);
if (Rainmeter->m_LogData.size() > MAXABOUTLOGLINES)
if (Rainmeter)
{
Rainmeter->m_LogData.pop_back();
Rainmeter->AddAboutLogInfo(logInfo);
}
// Use the lsapi.dll version of the method if possible