diff --git a/lib/base/string.cpp b/lib/base/string.cpp index 4474e4d6b..e8b9dbfe3 100644 --- a/lib/base/string.cpp +++ b/lib/base/string.cpp @@ -38,10 +38,8 @@ String::String(Value&& other) String& String::operator=(Value&& other) { - const String *p = other.GetPtr(); - - if (p) - m_Data = std::move(p->m_Data); + if (other.IsString()) + m_Data = std::move(other.Get()); else m_Data = other;