mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
check for null pointer
This commit is contained in:
parent
9a8c3486ff
commit
9d21ee5671
1 changed files with 6 additions and 1 deletions
|
@ -1401,7 +1401,12 @@ fixBOM(unsigned char **bytes, NSUInteger*length, BOOL *owned,
|
|||
}
|
||||
return (id)@"";
|
||||
}
|
||||
|
||||
if (0 == bytes)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"-%@ given NULL pointer",
|
||||
NSStringFromSelector(_cmd)];
|
||||
}
|
||||
fixBOM((unsigned char**)&bytes, &length, &flag, encoding);
|
||||
if (encoding == NSUnicodeStringEncoding)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue