mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-14 04:03:46 +00:00
add extra checks
add extra checks around an empty stringtableentry for assets and bitmap controls
This commit is contained in:
parent
1949ff9d7b
commit
08f52cfa16
4 changed files with 23 additions and 14 deletions
|
|
@ -121,16 +121,19 @@ void GuiBitmapCtrl::setBitmap(const char* name, bool resize)
|
|||
if (assetId != StringTable->EmptyString())
|
||||
_setBitmap(assetId);
|
||||
else
|
||||
_setBitmap(name);
|
||||
_setBitmap(StringTable->EmptyString());
|
||||
}
|
||||
|
||||
mBitmap = mBitmapAsset->getTexture(&GFXDefaultGUIProfile);
|
||||
|
||||
if (getBitmap() && resize)
|
||||
if (mBitmapAsset.notNull())
|
||||
{
|
||||
|
||||
setExtent(mBitmap->getWidth(), mBitmap->getHeight());
|
||||
updateSizing();
|
||||
mBitmap = mBitmapAsset->getTexture(&GFXDefaultGUIProfile);
|
||||
|
||||
if (getBitmap() && resize)
|
||||
{
|
||||
|
||||
setExtent(mBitmap->getWidth(), mBitmap->getHeight());
|
||||
updateSizing();
|
||||
}
|
||||
}
|
||||
|
||||
setUpdate();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue