Skip to content

Commit

Permalink
Merge pull request #18 from IvanUshakov/fix_13
Browse files Browse the repository at this point in the history
fix Error when initWith returns a new pointer
  • Loading branch information
jasperblues committed May 23, 2013
2 parents ed36ea3 + 30f9588 commit 610b238
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,9 @@ - (id)invokeInitializerOn:(id)instanceOrClass withDefinition:(TyphoonDefinition*
}
}
[invocation invoke];
if (definition.initializer.isClassMethod || definition.factoryReference)
{
__autoreleasing id <NSObject> returnValue = nil;
[invocation getReturnValue:&returnValue];
return returnValue;
}
else
{
return instanceOrClass;
}
__autoreleasing id <NSObject> returnValue = nil;
[invocation getReturnValue:&returnValue];
return returnValue;
}

/* ====================================================================================================================================== */
Expand Down

0 comments on commit 610b238

Please sign in to comment.