diff --git a/Source/Urho3D/Container/Str.h b/Source/Urho3D/Container/Str.h index ff2944892..576700341 100644 --- a/Source/Urho3D/Container/Str.h +++ b/Source/Urho3D/Container/Str.h @@ -165,7 +165,7 @@ class URHO3D_API String /// Destruct. ~String() { - if (capacity_) + if (capacity_ && buffer_ != &endZero) delete[] buffer_; }