зеркало из https://github.com/mozilla/pjs.git
Fix bug #8227/#9841 Deref errors
This commit is contained in:
Родитель
a4827eaa9c
Коммит
558d170697
|
@ -76,8 +76,12 @@ extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr,
|
|||
if (aClass.Equals(kLocaleFactoryCID))
|
||||
{
|
||||
nsLocaleFactory *factory = new nsLocaleFactory();
|
||||
if(nsnull == factory)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
if (NULL==factory)
|
||||
{
|
||||
*aFactory=NULL;
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
res = factory->QueryInterface(kILocaleFactoryIID, (void **) aFactory);
|
||||
|
||||
if (NS_FAILED(res))
|
||||
|
@ -92,8 +96,12 @@ extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr,
|
|||
if (aClass.Equals(kMacLocaleFactoryCID))
|
||||
{
|
||||
nsMacLocaleFactory *mac_factory = new nsMacLocaleFactory();
|
||||
if(nsnull == mac_factory)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
if (NULL==mac_factory)
|
||||
{
|
||||
*aFactory=NULL;
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
res = mac_factory->QueryInterface(kIFactoryIID,(void**) aFactory);
|
||||
|
||||
if (NS_FAILED(res))
|
||||
|
|
Загрузка…
Ссылка в новой задаче