fixes bug 290190 "crash when network connection drops and reconnects [@ msvcrt.dll - nsDNSRecord::GetNextAddr ]" r=biesi sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@182492 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
darin%meer.net
2005-10-18 21:25:05 +00:00
parent 5e4fa0d307
commit 3299d0abcb

View File

@@ -118,8 +118,10 @@ nsDNSRecord::GetNextAddr(PRUint16 port, PRNetAddr *addr)
return NS_ERROR_NOT_AVAILABLE;
}
else {
// This should never be null (but see bug 290190) :-(
NS_ENSURE_STATE(mHostRecord->addr);
mIter = nsnull; // no iterations
NS_ASSERTION(mHostRecord->addr, "no addr");
memcpy(addr, mHostRecord->addr, sizeof(PRNetAddr));
// set given port
port = PR_htons(port);