Skip to content

Commit

Permalink
crashfix-string deconstructor
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Azaezel committed Jun 2, 2020
1 parent 4bc0bb0 commit ac39577
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Engine/source/core/util/str.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,8 @@ String::String(const UTF16 *str)

String::~String()
{
_string->release();
if (_string && _string != StringData::Empty())
_string->release();
}

//-----------------------------------------------------------------------------
Expand Down

0 comments on commit ac39577

Please sign in to comment.