bug #25621: didn't check for null before |AddRef()|. Converted |NS_ADDREF|-->|NS_IF_ADDREF|. No code review.

This commit is contained in:
scc%netscape.com 2000-02-07 10:05:14 +00:00
parent 3c6bae46a2
commit 424433c86b

View File

@ -158,12 +158,12 @@ NS_COM nsIAtom* NS_NewAtom(const PRUnichar* us)
PLHashEntry* he = *hep;
if (nsnull != he) {
nsIAtom* id = (nsIAtom*) he->value;
NS_ADDREF(id);
NS_IF_ADDREF(id);
return id;
}
AtomImpl* id = new(us, uslen) AtomImpl();
PL_HashTableRawAdd(gAtomHashTable, hep, hashCode, id->mString, id);
NS_ADDREF(id);
NS_IF_ADDREF(id);
return id;
}