SDLPP: don't cause an exception when TextRenderer has an empty string
This commit is contained in:
parent
4143af9962
commit
4414ee6ff7
@ -78,6 +78,10 @@ void TextRenderer::render() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
void TextRenderer::updateTexture() {
|
void TextRenderer::updateTexture() {
|
||||||
|
if(_text.empty()) {
|
||||||
|
texture = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
int fontSize = 0.6 * getRect().h;
|
int fontSize = 0.6 * getRect().h;
|
||||||
_config->getFont()->changeFontSize( fontSize );
|
_config->getFont()->changeFontSize( fontSize );
|
||||||
int intOutline = _config->getOutlineSize();
|
int intOutline = _config->getOutlineSize();
|
||||||
|
Loading…
Reference in New Issue
Block a user