Join GitHub today
Handle empty vertex buffers in GUIFontTTFGL #15358
CGUIFontTTF::DrawTextInternal can end up with zero-element vertex
CGUIFontTTF::DrawTextInternal can end up with zero-element vertex buffers in corner cases such as when all text to render is completely clipped away. This should also be cached as such, so it is unfeasible to forbid empty vertex buffers completely. CGUIFontTTFDX already handles this case, but CGUIFontTTFGL did not. A previous crash fix added an assertion on the vertex list not being empty, but this is not needed anymore since that case is correctly handled now.
@FernetMenta This will go into 18.1 at the earliest, so I'm not in a hurry. Just report back when you have the time and I'll merge it for 18.1 rc1 if I don't hear from you.
Removing the assert might be fine since I changed