Skip to content

Commit

Permalink
add nil protect
Browse files Browse the repository at this point in the history
  • Loading branch information
yulingtianxia committed Jan 22, 2019
1 parent ad686b4 commit 6bd1e15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion MessageThrottle/MessageThrottle.m
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,9 @@ - (void)savePersistentRules
NSMutableSet *selectors = [self.targetSELs objectForKey:target];
for (NSString *selectorName in selectors) {
MTDealloc *mtDealloc = objc_getAssociatedObject(target, NSSelectorFromString(selectorName));
[rules addObject:mtDealloc.rule];
if (mtDealloc.rule) {
[rules addObject:mtDealloc.rule];
}
}
}
pthread_mutex_unlock(&mutex);
Expand Down

0 comments on commit 6bd1e15

Please sign in to comment.