mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
fix bug #45286
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39501 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ecd0657dee
commit
d5f56756ac
1 changed files with 8 additions and 2 deletions
|
@ -1536,9 +1536,15 @@ GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *locale)
|
|||
const unsigned char *data_bytes;
|
||||
|
||||
d = [[NSDataClass alloc] initWithContentsOfFile: path];
|
||||
if (d == nil)
|
||||
if (nil == d)
|
||||
{
|
||||
DESTROY(self);
|
||||
if (error != 0)
|
||||
{
|
||||
*error = [NSError errorWithDomain: NSCocoaErrorDomain
|
||||
code: NSFileReadUnknownError
|
||||
userInfo: nil];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
*enc = _DefaultStringEncoding;
|
||||
|
@ -1569,7 +1575,7 @@ GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *locale)
|
|||
}
|
||||
self = [self initWithData: d encoding: *enc];
|
||||
RELEASE(d);
|
||||
if (self == nil)
|
||||
if (nil == self)
|
||||
{
|
||||
if (error != 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue