From: Ryan Petrich Date: Mon, 3 Jan 2011 08:28:47 +0000 (-0700) Subject: Fix crash on Changes tab due to section index out of bounds X-Git-Tag: v1.1.0%b1~385 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/b9fed9bc261c54a9f81815cbc48c2a8caa77a2ff Fix crash on Changes tab due to section index out of bounds --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 3837d7b6..dc0f87da 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]; } }