Logger: add extra safety.
Though, that's not really enough for now.
This commit is contained in:
parent
4d94b10501
commit
929e0c73ee
1 changed files with 5 additions and 0 deletions
|
@ -112,6 +112,11 @@ addEntry(EntryType type, StringView message) {
|
|||
|
||||
ArrayView<const LogEntry>
|
||||
entries() {
|
||||
if(!_logMutex.try_lock()) {
|
||||
return nullptr;
|
||||
}
|
||||
_logMutex.unlock();
|
||||
|
||||
return _entries;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue