Avoid calling Copy from operator= if we are just resetting the nsXPIDLString. So now it is safe to reset an nsXPIDLCString or nsXPIDLString by setting it to null. r=waterson,a=jevering
git-svn-id: svn://10.0.0.236/trunk@61590 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -128,7 +128,8 @@ nsXPIDLCString& nsXPIDLCString::operator =(const char* aCString)
|
||||
if (mBufOwner && mBuf)
|
||||
XPIDL_FREE(mBuf);
|
||||
|
||||
mBuf = Copy(aCString);
|
||||
if (aCString)
|
||||
mBuf = Copy(aCString);
|
||||
mBufOwner = PR_TRUE;
|
||||
|
||||
return *this;
|
||||
|
||||
Reference in New Issue
Block a user