Skip to content

Commit

Permalink
fix(ui): Fix segmentation fault when opening the message log (endless…
Browse files Browse the repository at this point in the history
  • Loading branch information
RisingLeaf authored Jan 16, 2024
1 parent 4ee3a4f commit 216fa14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/Messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void Messages::Add(const string &message, Importance importance)
{
lock_guard<mutex> lock(incomingMutex);
incoming.emplace_back(message, importance);
if(message != logged.front().first)
if(logged.empty() || message != logged.front().first)
{
logged.emplace_front(message, importance);
if(logged.size() > MAX_LOG)
Expand Down

0 comments on commit 216fa14

Please sign in to comment.