mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Add assertions to trap runtime error
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29263 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e13a513f78
commit
0cbf8db121
2 changed files with 3 additions and 1 deletions
|
@ -302,6 +302,7 @@ NSCreateHashTableWithZone(
|
|||
if (concreteClass == Nil)
|
||||
{
|
||||
[NSConcreteHashTable class]; // Force +initialize
|
||||
NSCAssert(concreteClass != Nil, NSInternalInconsistencyException);
|
||||
}
|
||||
table = (GSIMapTable)[concreteClass allocWithZone: zone];
|
||||
|
||||
|
|
|
@ -440,6 +440,7 @@ NSCreateMapTableWithZone(
|
|||
if (concreteClass == Nil)
|
||||
{
|
||||
[NSConcreteMapTable class]; // Force +initialize
|
||||
NSCAssert(concreteClass != Nil, NSInternalInconsistencyException);
|
||||
}
|
||||
table = (GSIMapTable)[concreteClass allocWithZone: zone];
|
||||
|
||||
|
@ -1133,7 +1134,7 @@ const NSMapTableValueCallBacks NSOwnedPointerMapValueCallBacks =
|
|||
|
||||
+ (void) initialize
|
||||
{
|
||||
if (concreteClass == 0)
|
||||
if (concreteClass == Nil)
|
||||
{
|
||||
concreteClass = [NSConcreteMapTable class];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue