.. and fix 'position:' textatlas leaking. Finally no more crashing.

This commit is contained in:
UnknownShadow200 2020-07-28 19:45:21 +10:00
parent 4deba8e0d4
commit 9afde7d0aa

View File

@ -293,6 +293,7 @@ void TextAtlas_Make(struct TextAtlas* atlas, const String* chars, struct FontDes
Bitmap bmp;
int i, charWidth;
Gfx_DeleteTexture(&atlas->tex.ID);
DrawTextArgs_Make(&args, prefix, font, true);
width = Drawer2D_TextWidth(&args);
atlas->offset = width;