mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
GFXStateBlockDesc memory leak fix.
This commit is contained in:
parent
b4ca6c6e88
commit
01ffdae89a
2 changed files with 7 additions and 3 deletions
|
|
@ -292,8 +292,9 @@ GFXStateBlockRef GFXDevice::createStateBlock(const GFXStateBlockDesc& desc)
|
|||
PROFILE_SCOPE( GFXDevice_CreateStateBlock );
|
||||
|
||||
U32 hashValue = desc.getHashValue();
|
||||
if (mCurrentStateBlocks[hashValue])
|
||||
return mCurrentStateBlocks[hashValue];
|
||||
auto it = mCurrentStateBlocks.find(hashValue);
|
||||
if (it != mCurrentStateBlocks.end())
|
||||
return it->value;
|
||||
|
||||
GFXStateBlockRef result = createStateBlockInternal(desc);
|
||||
result->registerResourceWithDevice(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue