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:
gagan%netscape.com
2000-02-24 05:34:28 +00:00
parent b450edf7fb
commit f341a3c51f
3 changed files with 6 additions and 3 deletions

View File

@@ -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;