SDLPP: don't cause an exception when TextRenderer has an empty string

This commit is contained in:
zvon 2022-07-21 20:07:56 +02:00
parent 4143af9962
commit 4414ee6ff7

View File

@ -78,6 +78,10 @@ void TextRenderer::render() {
}
}
void TextRenderer::updateTexture() {
if(_text.empty()) {
texture = NULL;
return;
}
int fontSize = 0.6 * getRect().h;
_config->getFont()->changeFontSize( fontSize );
int intOutline = _config->getOutlineSize();