From 8ae063dec8637c82fa1aada6ccdff089a6d3a706 Mon Sep 17 00:00:00 2001 From: Li Tan Date: Thu, 22 Jan 2015 12:21:30 -0800 Subject: [PATCH] Add check for willDeleteSections: --- AsyncDisplayKit/Details/ASRangeController.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AsyncDisplayKit/Details/ASRangeController.mm b/AsyncDisplayKit/Details/ASRangeController.mm index 737f7ad1cc..db354aef77 100644 --- a/AsyncDisplayKit/Details/ASRangeController.mm +++ b/AsyncDisplayKit/Details/ASRangeController.mm @@ -294,7 +294,9 @@ - (void)dataController:(ASDataController *)dataController willDeleteSectionsAtIndexSet:(NSIndexSet *)indexSet withAnimationOption:(ASDataControllerAnimationOptions)animationOption { ASDisplayNodePerformBlockOnMainThread(^{ + if ([_delegate respondsToSelector:@selector(rangeController:willDeleteSectionsAtIndexSet:withAnimationOption:)]) { [_delegate rangeController:self willDeleteSectionsAtIndexSet:indexSet withAnimationOption:animationOption]; + } }); }