diff options
Diffstat (limited to 'libcore')
| -rw-r--r-- | libcore/helpers.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libcore/helpers.c b/libcore/helpers.c index 5dc5156..9604e3a 100644 --- a/libcore/helpers.c +++ b/libcore/helpers.c @@ -51,8 +51,10 @@ int Minimum(int a, int b, int c, int d, int e, int f) { string CutText(string &text, int width, string fontName, int fontSize) { if (width <= fontManager->Font(fontName, fontSize)->Size()) return text.c_str(); + fontManager->Lock(); cTextWrapper twText; twText.Set(text.c_str(), fontManager->Font(fontName, fontSize), width); + fontManager->Unlock(); string cuttedTextNative = twText.GetLine(0); stringstream sstrText; sstrText << cuttedTextNative << "..."; |
