From b9fed9bc261c54a9f81815cbc48c2a8caa77a2ff Mon Sep 17 00:00:00 2001 From: Ryan Petrich Date: Mon, 3 Jan 2011 01:28:47 -0700 Subject: Fix crash on Changes tab due to section index out of bounds --- MobileCydia.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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]; } } -- cgit v1.2.3