Fixed: Changing font name for already rendered text leading to crash.
--HG-- branch : develop
This commit is contained in:
parent
35f5c1b77f
commit
ac4fd3f8b2
1 changed files with 5 additions and 6 deletions
|
@ -1440,12 +1440,11 @@ namespace NLGUI
|
||||||
if (_FontName == name)
|
if (_FontName == name)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_FontName.length() > 0)
|
if (_Index != 0xFFFFFFFF)
|
||||||
{
|
CViewRenderer::getTextContext(_FontName)->erase (_Index);
|
||||||
if (_Index != 0xFFFFFFFF)
|
clearLines();
|
||||||
CViewRenderer::getTextContext(_FontName)->erase (_Index);
|
|
||||||
clearLines();
|
resetTextIndex();
|
||||||
}
|
|
||||||
|
|
||||||
_FontName = name;
|
_FontName = name;
|
||||||
computeFontSize ();
|
computeFontSize ();
|
||||||
|
|
Loading…
Reference in a new issue