From b5d4d9aba3e3cab41386463ea091e46576b31b70 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 1 Sep 2016 15:25:14 +0200 Subject: [PATCH] Fix move assignment operator for the String class fixes #12619 --- lib/base/string.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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;