forked from OSchip/llvm-project
[lldb-mi] Fix assignment operator in CMIUtilString
Fix assignment operator in CMIUtilString to not crash the debugger if it is passed a NULL pointer, which can happen in code like the following: SBValue val; CMIUtilString s; //... s = val.GetSummary(); Patch from evgeny.leviant@gmail.com Reviewed by: clayborg, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13094 llvm-svn: 248597
This commit is contained in:
parent
8e3a7ede94
commit
a556fe8ec3
|
@ -63,14 +63,7 @@ CMIUtilString::CMIUtilString(const std::string& vrStr)
|
|||
//--
|
||||
CMIUtilString &CMIUtilString::operator=(const char *vpRhs)
|
||||
{
|
||||
if (*this == vpRhs)
|
||||
return *this;
|
||||
|
||||
if (vpRhs != nullptr)
|
||||
{
|
||||
assign(vpRhs);
|
||||
}
|
||||
|
||||
assign(vpRhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue