summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorRyan Petrich <rpetrich@gmail.com>2011-01-03 01:28:47 -0700
committerRyan Petrich <rpetrich@gmail.com>2011-01-03 01:28:47 -0700
commitb9fed9bc261c54a9f81815cbc48c2a8caa77a2ff (patch)
treecdc025397cee3ac93ef09c8e987cf29293545539 /MobileCydia.mm
parent1e94d48bab22034f48a4f7846697b3d443476f30 (diff)
Fix crash on Changes tab due to section index out of bounds
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 3837d7b..dc0f87d 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -7483,7 +7483,10 @@ freeing the view controllers on tab change */
if ([database_ era] != era_)
return nil;
- Section *section([sections_ objectAtIndex:[path section]]);
+ NSUInteger sectionIndex([path section]);
+ if (sectionIndex >= [sections_ count])
+ return nil;
+ Section *section([sections_ objectAtIndex:sectionIndex]);
NSInteger row([path row]);
return [[[self packageAtIndex:([section row] + row)] retain] autorelease];
} }