From 98be8aaeff78ad85dd024a782b0171fc4375718b Mon Sep 17 00:00:00 2001 From: fourtf Date: Wed, 25 Apr 2018 14:53:54 +0200 Subject: [PATCH] fixed crash --- src/application.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/application.cpp b/src/application.cpp index f75408b8..271dbc4a 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -10,6 +10,7 @@ #include "singletons/settingsmanager.hpp" #include "singletons/thememanager.hpp" #include "singletons/windowmanager.hpp" +#include "util/posttothread.hpp" using namespace chatterino::singletons; @@ -80,7 +81,7 @@ Application::Application() .arg(action.duration) .arg(action.reason)); - chan->addMessage(msg); + util::postToThread([chan, msg] { chan->addMessage(msg); }); debug::Log("User {}({}) was timed out by {} for {} seconds with reason: '{}'", action.target.name, action.target.id, action.source.name, action.duration,