Fix two unchecked pointer dereferences in the libobjc2 compatibility

code, which could cause crashes when attempting to invoke a selector
which is not implemented by the target.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31384 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2010-09-20 18:13:48 +00:00
parent a26b510c01
commit 2a5d060cfa
2 changed files with 9 additions and 2 deletions

View file

@ -675,13 +675,13 @@ method_getArgumentType(Method method,
IMP
method_getImplementation(Method method)
{
return (IMP) method->method_imp;
return method ? (IMP) method->method_imp : (IMP) 0;
}
SEL
method_getName(Method method)
{
return method->method_name;
return method ? method->method_name : (SEL) 0;
}
unsigned