Handle failure case in a way that doesn't crash. b=328113 r+sr+a=bryner
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@192156 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -218,7 +218,10 @@ nsDownloadManager::Init()
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
rv = NS_STATIC_CAST(nsDownloadsDataSource*, (nsIRDFDataSource*)mDataSource.get())->LoadDataSource();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (NS_FAILED(rv)) {
|
||||
mDataSource = nsnull; // so we don't UnregisterDataSource on it
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(kStringBundleServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
Reference in New Issue
Block a user