mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +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
|
|
@ -123,6 +123,12 @@ private:
|
|||
String mBitmapFile;
|
||||
public:
|
||||
void _setBitmap(StringTableEntry _in) {
|
||||
if (_in == NULL || _in == StringTable->EmptyString() || _in == "")
|
||||
{
|
||||
mBitmapAsset = NULL;
|
||||
mBitmapFile = "";
|
||||
return;
|
||||
}
|
||||
if (mBitmapAsset.getAssetId() == _in) return; if (!AssetDatabase.isDeclaredAsset(_in)) {
|
||||
StringTableEntry imageAssetId = ImageAsset::smNoImageAssetFallback; AssetQuery query; S32 foundAssetcount = AssetDatabase.findAssetLooseFile(&query, _in); if (foundAssetcount != 0) {
|
||||
imageAssetId = query.mAssetList[0];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue