Fix bugzilla bug #2568
nsHttpUrlImpl::GetContainer was always returning with NS_OK even if the container is nil. After discussing it with rpotts I've changed it to return NS_ERROR_UNEXPECTED if mContainer is nil which fixes the Mac crash (calling QueryInterface on a nil container is probably bad everywhere though). git-svn-id: svn://10.0.0.236/trunk@21815 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
cd2d4a3130
commit
8b53976170
@ -818,7 +818,10 @@ nsresult nsHttpUrlImpl::GetContainer(nsISupports* *result) const
|
||||
*result = mContainer;
|
||||
NS_IF_ADDREF(mContainer);
|
||||
NS_UNLOCK_INSTANCE();
|
||||
return NS_OK;
|
||||
if (mContainer)
|
||||
return NS_OK;
|
||||
else
|
||||
return NS_ERROR_UNEXPECTED; // Indicate an error if no container
|
||||
}
|
||||
|
||||
nsresult nsHttpUrlImpl::SetContainer(nsISupports* container)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user