fix bug 121118. Don't crash if interfaceinfo is not resolvable at runtime. r=dbradley sr=brendan

This commit is contained in:
jband%netscape.com 2002-01-30 02:36:20 +00:00
Родитель 1c41377183
Коммит 0e1389b8f2
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -427,8 +427,15 @@ xptiInterfaceEntry::GetEntryForParam(PRUint16 methodIndex,
xptiInterfaceEntry* theEntry =
mInterface->mWorkingSet->GetTypelibGuts(mInterface->mTypelib)->
GetEntryAt(td->type.iface - 1);
// This can happen if a declared interface is not available at runtime.
if(!theEntry)
{
NS_WARNING("Declared InterfaceInfo not found");
*entry = nsnull;
return NS_ERROR_FAILURE;
}
NS_ASSERTION(theEntry, "bad state");
*entry = theEntry;
return NS_OK;
}