a few checks for failed mem allocation

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36882 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2013-07-13 11:02:30 +00:00
parent c61a5faaff
commit 0a81a2f8dd
2 changed files with 24 additions and 9 deletions

View file

@ -5223,13 +5223,13 @@ static NSFileManager *fm = nil;
if (string == nil)
[NSException raise: NSInvalidArgumentException format: @"compare with nil"];
#if GS_USE_ICU == 1
if (nil != locale
&& ![locale isKindOfClass: [NSLocale class]])
&& ![locale isKindOfClass: [NSLocale class]])
{
locale = [NSLocale currentLocale];
}
#if GS_USE_ICU == 1
{
UCollator *coll = GSICUCollatorOpen(mask, locale);