mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
* Source/Additions/GSObjCRuntime.m
(GSCGetInstanceVariableDefinition): Make more robust. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17195 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dfd87fb51b
commit
ab38554fd9
2 changed files with 7 additions and 1 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
* Source/GNUmakefile: Make GNUstep.h public.
|
||||
* Source/Additions/GSXML.m: Use cached NSString class variable.
|
||||
* Source/Additions/GSObjCRuntime.m
|
||||
(GSCGetInstanceVariableDefinition): Make more robust.
|
||||
|
||||
2003-07-11 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -682,8 +682,12 @@ GSCGetInstanceVariableDefinition(Class class, const char *name)
|
|||
{
|
||||
struct objc_ivar_list *list;
|
||||
int i;
|
||||
|
||||
if (class == 0)
|
||||
return 0;
|
||||
|
||||
list = class->ivars;
|
||||
for (i = 0; i < list->ivar_count; i++)
|
||||
for (i = 0; (list != 0) && i < list->ivar_count; i++)
|
||||
{
|
||||
if (strcmp (list->ivar_list[i].ivar_name, name) == 0)
|
||||
return &(list->ivar_list[i]);
|
||||
|
|
Loading…
Reference in a new issue