From 155870ef503edede6fe18560d5ec891d84445627 Mon Sep 17 00:00:00 2001 From: rfm Date: Mon, 9 Jul 2012 15:31:12 +0000 Subject: [PATCH] fi for bug #36706 git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35278 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 4 ++++ Source/GSFFIInvocation.m | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 80bfabeb9..43f771e4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-07-09 Richard Frith-Macdonald + + * Source/GSFFIInvocation.m: Fix for bug #36706 + 2012-07-09 Sebastian Reitenbach * Source/NSThread.m: Fixes test for posix thread scheduling. diff --git a/Source/GSFFIInvocation.m b/Source/GSFFIInvocation.m index 487d2b06b..5fe9a305d 100644 --- a/Source/GSFFIInvocation.m +++ b/Source/GSFFIInvocation.m @@ -191,6 +191,14 @@ static IMP gs_objc_msg_forward2 (id receiver, SEL sel) } if (nil == sig) { + if (nil == receiver) + { + /* If we have a nil receiver, so the runtime is probably trying + * to check for forwarding ... return NULL to let it fall back + * on the standard forwarding mechanism. + */ + return NULL; + } [NSException raise: NSInvalidArgumentException format: @"%c[%s %s]: unrecognized selector sent to instance %p", (class_isMetaClass(c) ? '+' : '-'),