From 2870560006974e0e64499602bc61667ed740a4fe Mon Sep 17 00:00:00 2001 From: Sebastian Ludwig Date: Wed, 10 Jun 2015 20:43:56 +0200 Subject: [PATCH] Fixed #1026 by avoiding overreleasing the sender (the tapped message view cell) of a custom context menu action. --- JSQMessagesViewController/Views/JSQMessagesCollectionViewCell.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSQMessagesViewController/Views/JSQMessagesCollectionViewCell.m b/JSQMessagesViewController/Views/JSQMessagesCollectionViewCell.m index 3ea4896ad..e8e09b9fd 100644 --- a/JSQMessagesViewController/Views/JSQMessagesCollectionViewCell.m +++ b/JSQMessagesViewController/Views/JSQMessagesCollectionViewCell.m @@ -250,7 +250,7 @@ - (BOOL)respondsToSelector:(SEL)aSelector - (void)forwardInvocation:(NSInvocation *)anInvocation { if ([jsqMessagesCollectionViewCellActions containsObject:NSStringFromSelector(anInvocation.selector)]) { - id sender; + __unsafe_unretained id sender; [anInvocation getArgument:&sender atIndex:0]; [self.delegate messagesCollectionViewCell:self didPerformAction:anInvocation.selector withSender:sender]; }