mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
crashfix-string deconstructor
validate we aren't either empty or using the reserved empty string before we release the pointed to value (as a note, the latter at least shouldn't have been required, but might as well be paranoid about it)
This commit is contained in:
parent
11f0ec2c0f
commit
81a4e47235
1 changed files with 2 additions and 1 deletions
|
|
@ -590,7 +590,8 @@ String::String(const UTF16 *str)
|
||||||
|
|
||||||
String::~String()
|
String::~String()
|
||||||
{
|
{
|
||||||
_string->release();
|
if (_string && _string != StringData::Empty())
|
||||||
|
_string->release();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue