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) ? '+' : '-'),