From 81a4e47235bb9d495d0a08dd5cbc71262f4611fa Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Tue, 2 Jun 2020 17:10:39 -0500 Subject: [PATCH] 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) --- Engine/source/core/util/str.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Engine/source/core/util/str.cpp b/Engine/source/core/util/str.cpp index 1a15b8b85..78d008758 100644 --- a/Engine/source/core/util/str.cpp +++ b/Engine/source/core/util/str.cpp @@ -590,7 +590,8 @@ String::String(const UTF16 *str) String::~String() { - _string->release(); + if (_string && _string != StringData::Empty()) + _string->release(); } //-----------------------------------------------------------------------------