From: Jay Freeman (saurik) Date: Wed, 23 Feb 2011 08:26:19 +0000 (-0800) Subject: Slightly more compliant / safer NSRunLoop mode. X-Git-Tag: v1.1.0%b1~250 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/3fb1a73c977a3163429cde749b51590186d0ed2f?hp=eb403f34aa7c79d31e2ef331862c4d4b8cd25877 Slightly more compliant / safer NSRunLoop mode. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 9cc6f405..3b09f6a6 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -288,8 +288,9 @@ static _finline void UpdateExternalStatus(uint64_t newStatus) { NSRunLoop *loop([NSRunLoop currentRunLoop]); NSDate *future([NSDate distantFuture]); + NSString *mode([loop currentMode] ?: NSDefaultRunLoopMode); - while (!stopped && [loop runMode:NSDefaultRunLoopMode beforeDate:future]); + while (!stopped && [loop runMode:mode beforeDate:future]); return [context count] == 0 ? nil : [context objectAtIndex:0]; }