Checked for null in memory allocation per bug #9852
git-svn-id: svn://10.0.0.236/trunk@39561 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
7698b1b0b0
commit
4b7d91b21a
@ -226,11 +226,15 @@ nsJAREnumerator::GetNext(nsISupports** aResult)
|
||||
|
||||
// pack into an nsIJARItem
|
||||
nsIJARItem* jarItem = new nsJARItem(mCurr);
|
||||
jarItem->AddRef();
|
||||
*aResult = jarItem;
|
||||
mIsCurrStale = PR_TRUE; // we just gave this one away
|
||||
|
||||
return NS_OK;
|
||||
if(jarItem)
|
||||
{
|
||||
jarItem->AddRef();
|
||||
*aResult = jarItem;
|
||||
mIsCurrStale = PR_TRUE; // we just gave this one away
|
||||
return NS_OK;
|
||||
}
|
||||
else
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user