Bug 972593, part 2 - Don't deref an always-null pointer in nsStreamConverterService::FindConverter. r=mcmanus

This commit is contained in:
Mark Banner 2014-05-02 16:12:32 +01:00
parent e19d4d81e6
commit 2c0406341e

View File

@ -269,10 +269,8 @@ nsStreamConverterService::FindConverter(const char *aContractID, nsTArray<nsCStr
for (int32_t i = 0; i < edgeCount; i++) {
nsIAtom* curVertexAtom = data2->ObjectAt(i);
nsAutoString curVertexStr;
curVertexAtom->ToString(curVertexStr);
nsCString *curVertex = nullptr;
CopyUTF16toUTF8(curVertexStr, *curVertex);
nsCString *curVertex = new nsCString();
curVertexAtom->ToUTF8String(*curVertex);
BFSTableData *curVertexState = lBFSTable.Get(*curVertex);
if (!curVertexState) {