diff options
Diffstat (limited to 'lldb/source/API/SBStringList.cpp')
-rw-r--r-- | lldb/source/API/SBStringList.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lldb/source/API/SBStringList.cpp b/lldb/source/API/SBStringList.cpp index beb760632fa..129d2f4c11f 100644 --- a/lldb/source/API/SBStringList.cpp +++ b/lldb/source/API/SBStringList.cpp @@ -34,21 +34,23 @@ SBStringList::SBStringList (const SBStringList &rhs) : } - -SBStringList::~SBStringList () -{ -} - - const SBStringList & SBStringList::operator = (const SBStringList &rhs) { - if (rhs.IsValid()) - m_opaque_ap.reset (new lldb_private::StringList(*rhs)); - + if (this != &rhs) + { + if (rhs.IsValid()) + m_opaque_ap.reset(new lldb_private::StringList(*rhs)); + else + m_opaque_ap.reset(); + } return *this; } +SBStringList::~SBStringList () +{ +} + const lldb_private::StringList * SBStringList::operator->() const { |