summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Paul <chpwn@chpwn.com>2011-02-26 00:36:31 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-07 02:41:22 -0800
commitb3551da81111bb32cd8be2cbb6e184f82c6eb842 (patch)
treeffad31b06ec5955a37324a09f7e34f8c1e9db334
parent25fdc94109ecac40ff45dff9a176180806c151e6 (diff)
Fixed crash in SectionsController when there are hidden sections.
-rw-r--r--MobileCydia.mm13
1 files changed, 8 insertions, 5 deletions
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;
}