Skip to content

Commit

Permalink
Client|LogWidget: Avoid a race condition in the log sink
Browse files Browse the repository at this point in the history
It was possible that when entries are added into the MemoryLogSink,
there was a situation where an invalid index was accessed (likely
due to a purge occurring in the background).
  • Loading branch information
skyjake committed Nov 23, 2013
1 parent 6d623c0 commit 07f95ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doomsday/client/src/ui/widgets/logwidget.cpp
Expand Up @@ -242,6 +242,8 @@ public Font::RichFormat::IStyle
*/
void beginWorkOnNext()
{
DENG2_GUARD(this);

while(_width > 0 && _next >= 0 && _next < entryCount())
{
LogEntry const &ent = entry(_next);
Expand Down

0 comments on commit 07f95ae

Please sign in to comment.