From 90fedd6e46208b51acfe80c7de0bca8f3e45bb8d Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 6 Jul 2008 17:14:35 +0200 Subject: Use NS_VALUERETURN properly. --- MLKRoot.m | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'MLKRoot.m') diff --git a/MLKRoot.m b/MLKRoot.m index 7ef7339..e3dca4f 100644 --- a/MLKRoot.m +++ b/MLKRoot.m @@ -77,17 +77,23 @@ static id stringify (id thing) NSMutableString *methodName; NSArray *result; SEL selector; + BOOL nothing_found; + + nothing_found = NO; NS_DURING { if ([sys findSymbol:[name name]] != name) - return nil; + NS_VALUERETURN (nil, NSArray *); } NS_HANDLER { - NS_VALUERETURN (nil, NSArray *); + nothing_found = YES; } - NS_ENDHANDLER + NS_ENDHANDLER; + + if (nothing_found) + return nil; invocation = [NSInvocation invocationWithMethodSignature:signature]; -- cgit v1.2.3