From 216fa14b6a10bc9b634f3027b78c284c884f6c0e Mon Sep 17 00:00:00 2001 From: Rising Leaf <85687254+RisingLeaf@users.noreply.github.com> Date: Tue, 16 Jan 2024 20:25:02 +0100 Subject: [PATCH] fix(ui): Fix segmentation fault when opening the message log (#9675) --- source/Messages.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Messages.cpp b/source/Messages.cpp index 37872211bcd9..95274472f22f 100644 --- a/source/Messages.cpp +++ b/source/Messages.cpp @@ -39,7 +39,7 @@ void Messages::Add(const string &message, Importance importance) { lock_guard 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)