Bug 283840 "Select User Profile" dialog is broken after using "Custom" in installer
patch by ajschult@verizon.net r=bsmedberg sr=dveditz git-svn-id: svn://10.0.0.236/trunk@170792 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
762e81f2b6
commit
1ce9ffb4cd
@ -152,7 +152,6 @@ nsComponentList::AddComponent(nsComponent *aComponent)
|
||||
return E_PARAM;
|
||||
|
||||
aComponent->AddRef();
|
||||
aComponent->SetIndex(mLength);
|
||||
nsComponentItem *newItem
|
||||
= (nsComponentItem *) malloc(sizeof(nsComponentItem));
|
||||
newItem->mComp = aComponent;
|
||||
@ -236,7 +235,6 @@ nsComponentList::GetCompByIndex(int aIndex)
|
||||
}
|
||||
|
||||
currItem = currItem->mNext;
|
||||
if (!currItem) break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
@ -178,6 +178,7 @@ nsComponentsDlg::Parse(nsINIParser *aParser)
|
||||
currComp = new nsComponent();
|
||||
if (!currComp) return E_MEM;
|
||||
|
||||
currComp->SetIndex(i);
|
||||
currComp->SetDescShort(currDescShort);
|
||||
currComp->SetDescLong(currDescLong);
|
||||
currComp->SetArchive(currArchive);
|
||||
|
||||
@ -326,15 +326,16 @@ nsSetupTypeDlg::Parse(nsINIParser *aParser)
|
||||
break;
|
||||
}
|
||||
|
||||
currComp = NULL;
|
||||
currIndex = atoi(currVal + strlen(COMPONENT));
|
||||
currComp = compList->GetCompByIndex(currIndex);
|
||||
if (currComp)
|
||||
if (!currComp)
|
||||
{
|
||||
// preserve next ptr
|
||||
currST->SetComponent(currComp);
|
||||
currNumComps++;
|
||||
err = E_OUT_OF_BOUNDS;
|
||||
goto BAIL;
|
||||
}
|
||||
|
||||
currST->SetComponent(currComp);
|
||||
currNumComps++;
|
||||
}
|
||||
if (currNumComps > 0)
|
||||
{
|
||||
|
||||
@ -135,6 +135,8 @@ nsXInstaller::ParseConfig()
|
||||
|
||||
BAIL:
|
||||
XI_IF_FREE(cfg);
|
||||
if (err != OK)
|
||||
ErrorHandler(err);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user