fix crash due to dereferencin a null pointer.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31570 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2010-10-27 22:19:18 +00:00
parent b7ad06e540
commit 79eac15152
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2010-10-27 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSFFIInvocation.m: Revert David's last change ,which caused
crashes by dereferencing a null pointer, even though I had put a
comment in the code warning that the pointer could be null!
2010-10-27 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac: Fix definition of HAVE_ICU

View file

@ -134,7 +134,7 @@ static IMP gs_objc_msg_forward2 (id receiver, SEL sel)
* NB. object_getClass() and class_respondsToSelector() should both
* return NULL when given NULL arguments, so they are safe to use.
*/
c = receiver->isa;
c = object_getClass(receiver);
if (class_respondsToSelector(c, @selector(methodSignatureForSelector:)))
{
sig = [receiver methodSignatureForSelector: sel];
@ -243,7 +243,7 @@ BOOL class_respondsToSelector(Class cls, SEL sel);
*/
static id gs_objc_proxy_lookup(id receiver, SEL op)
{
id cls = receiver->isa;
id cls = object_getClass(receiver);
BOOL resolved = NO;
/* Let the class try to add a method for this thing. */