From 1c412005aed1cc3da4ae4e2973afd2b64142e0ce Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 10 Aug 2020 13:33:54 -0300 Subject: [PATCH] Fix bug. --- SignalMessaging/Views/ContactsViewHelper.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SignalMessaging/Views/ContactsViewHelper.m b/SignalMessaging/Views/ContactsViewHelper.m index 1180930b5a..db0dfc4131 100644 --- a/SignalMessaging/Views/ContactsViewHelper.m +++ b/SignalMessaging/Views/ContactsViewHelper.m @@ -178,11 +178,12 @@ NS_ASSUME_NONNULL_BEGIN { OWSAssertIsOnMainThread(); + // Notify delegates & cull stale delegates. NSMutableArray *delegates = [NSMutableArray new]; for (ContactsViewHelperDelegateBox *box in self.delegates) { id _Nullable delegate = box.delegate; if (delegate) { - [delegates addObject:delegate]; + [delegates addObject:box]; [delegate contactsViewHelperDidUpdateContacts]; } }