From b3551da81111bb32cd8be2cbb6e184f82c6eb842 Mon Sep 17 00:00:00 2001 From: Grant Paul Date: Sat, 26 Feb 2011 00:36:31 -0800 Subject: Fixed crash in SectionsController when there are hidden sections. --- MobileCydia.mm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'MobileCydia.mm') diff --git a/MobileCydia.mm b/MobileCydia.mm index 9448e64..662c08b 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -7335,12 +7335,15 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (Section *) sectionAtIndexPath:(NSIndexPath *)indexPath { - Section *section = nil; + Section *section = nil; int index = [indexPath row]; - if (![self isEditing]) - index -= 1; - if (index >= 0) - section = [filtered_ objectAtIndex:index]; + if (![self isEditing]) { + index -= 1; + if (index >= 0) + section = [filtered_ objectAtIndex:index]; + } else { + section = [sections_ objectAtIndex:index]; + } return section; } -- cgit v1.2.3