From a2a24f347cc6057801d437faddd8b5b4865180ce Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Tue, 14 May 2013 21:47:37 +0000 Subject: [PATCH] minor fixing --- src/GUIManager/ButtonWidget.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/GUIManager/ButtonWidget.cpp b/src/GUIManager/ButtonWidget.cpp index bf3f30e..8974eaf 100644 --- a/src/GUIManager/ButtonWidget.cpp +++ b/src/GUIManager/ButtonWidget.cpp @@ -175,7 +175,13 @@ void TDynamicText::UpdateText(std::string text) vec2 posFrom = LeftBottomPos; vec2 posTo = LeftBottomPos + vec2(Width, Height); - TextRenderPairItr->second = CreateTriangleListForText(posFrom, posTo, LastTextParams); + + PerformInMainThreadAsync( + [this, posFrom, posTo]() + { + this->TextRenderPairItr->second = CreateTriangleListForText(posFrom, posTo, this->LastTextParams); + } + ); } }