mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
Small crash fix
Crash fix when font isn't set.
This commit is contained in:
parent
77b9600303
commit
d0972c9be1
1 changed files with 2 additions and 0 deletions
|
|
@ -602,6 +602,8 @@ void GuiControl::setUpdate()
|
||||||
void GuiControl::renderJustifiedText(Point2I offset, Point2I extent, const char *text)
|
void GuiControl::renderJustifiedText(Point2I offset, Point2I extent, const char *text)
|
||||||
{
|
{
|
||||||
GFont *font = mProfile->mFont;
|
GFont *font = mProfile->mFont;
|
||||||
|
if(!font)
|
||||||
|
return;
|
||||||
S32 textWidth = font->getStrWidthPrecise((const UTF8*)text);
|
S32 textWidth = font->getStrWidthPrecise((const UTF8*)text);
|
||||||
U32 textHeight = font->getHeight();
|
U32 textHeight = font->getHeight();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue