]> git.saurik.com Git - cydia.git/commitdiff
Fixed crash in SectionsController when there are hidden sections.
authorGrant Paul <chpwn@chpwn.com>
Sat, 26 Feb 2011 08:36:31 +0000 (00:36 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 7 Mar 2011 10:41:22 +0000 (02:41 -0800)
MobileCydia.mm

index 9448e640dc82b102a933ae268b3904721a0b87ba..662c08b7c96d168efdaa477a0624d5c3d0be88ea 100644 (file)
@@ -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;
 }