fix for crasher nsbeta3++ bug 52818, r=dp, r/a=rpotts

git-svn-id: svn://10.0.0.236/trunk@80050 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
neeti%netscape.com 2000-09-28 04:08:22 +00:00
parent 55b259a10b
commit 54302036e0
2 changed files with 3 additions and 1 deletions

View File

@ -431,6 +431,8 @@ nsNetDiskCache::GetCachedNetDataByID(PRInt32 RecordID, nsINetDataCacheRecord **_
printf("CACHE: GetCachedNetDataByID(id=%d) created nsDiskCacheRecord %p\n", RecordID, *_retval);
#endif /* DEBUG_dp */
return rv;
} else if(!info) {
rv = NS_ERROR_FAILURE;
}
#ifdef DEBUG_dp

View File

@ -1044,7 +1044,7 @@ nsCachedNetData::Delete(void)
nsCOMPtr<nsINetDataCacheRecord> record;
rv = GetRecord(getter_AddRefs(record));
if (NS_SUCCEEDED(rv))
if (NS_SUCCEEDED(rv) && record)
{
// Delete the record if we can get a record.
record->Delete();