diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-15 12:45:52 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-15 19:03:41 +0200 |
commit | eb8da869cf87692a5cbb38803644643cd2e192f6 (patch) | |
tree | 996de2523ae26cd870dd3c7361dd00131d11a36c /src/ui/text.c | |
parent | 318de08090d9110106cb1cc4c01d8572e70d0d5c (diff) |
Text: Don't crash after cache reset
Diffstat (limited to 'src/ui/text.c')
-rw-r--r-- | src/ui/text.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ui/text.c b/src/ui/text.c index abfefe80..6642b9ef 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -999,6 +999,7 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) { | |||
999 | if (!isRasterized_Glyph_(glyph, hoff)) { | 999 | if (!isRasterized_Glyph_(glyph, hoff)) { |
1000 | /* Need to pause here and make sure all glyphs have been cached in the text. */ | 1000 | /* Need to pause here and make sure all glyphs have been cached in the text. */ |
1001 | cacheTextGlyphs_Font_(d, args->text); | 1001 | cacheTextGlyphs_Font_(d, args->text); |
1002 | glyph = glyph_Font_(d, ch); /* cache may have been reset */ | ||
1002 | } | 1003 | } |
1003 | int x2 = x1 + glyph->rect[hoff].size.x; | 1004 | int x2 = x1 + glyph->rect[hoff].size.x; |
1004 | /* Out of the allotted space? */ | 1005 | /* Out of the allotted space? */ |