From 820315ecc597e36126c1aceadec87c33b69fa90a Mon Sep 17 00:00:00 2001 From: "sfraser%netscape.com" Date: Tue, 15 May 2001 00:34:10 +0000 Subject: [PATCH] Fix the a problem exposed by another bug, where out params were not correctly set to null. Part of fix for bug 80722 (crash creating new profile). --- xpcom/io/nsLocalFileCommon.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xpcom/io/nsLocalFileCommon.cpp b/xpcom/io/nsLocalFileCommon.cpp index 20b18de6f277..cb207b6bf633 100644 --- a/xpcom/io/nsLocalFileCommon.cpp +++ b/xpcom/io/nsLocalFileCommon.cpp @@ -205,13 +205,13 @@ nsFSStringConversion::UCSToNewFS( const PRUnichar* aIn, char** aOut) res= mEncoder->GetMaxLength(aIn, inLength,&outLength); if(NS_SUCCEEDED(res)) { *aOut = (char*)nsMemory::Alloc(outLength+1); - if(nsnull != aOut) { + if(nsnull != *aOut) { res = mEncoder->Convert(aIn, &inLength, *aOut, &outLength); if(NS_SUCCEEDED(res)) { (*aOut)[outLength] = '\0'; } else { nsMemory::Free(*aOut); - aOut = nsnull; + *aOut = nsnull; } } else { res = NS_ERROR_OUT_OF_MEMORY; @@ -234,13 +234,13 @@ nsFSStringConversion::FSToNewUCS( const char* aIn, PRUnichar** aOut) res= mDecoder->GetMaxLength(aIn, inLength,&outLength); if(NS_SUCCEEDED(res)) { *aOut = (PRUnichar*)nsMemory::Alloc(2*(outLength+1)); - if(nsnull != aOut) { + if(nsnull != *aOut) { res = mDecoder->Convert(aIn, &inLength, *aOut, &outLength); if(NS_SUCCEEDED(res)) { (*aOut)[outLength] = '\0'; } else { nsMemory::Free(*aOut); - aOut = nsnull; + *aOut = nsnull; } } else { res = NS_ERROR_OUT_OF_MEMORY;