diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-23 00:26:19 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-23 00:26:19 -0800 |
commit | 3fb1a73c977a3163429cde749b51590186d0ed2f (patch) | |
tree | fad73f1545f5ff4e364bdadbc4af7fd80f74fa20 | |
parent | eb403f34aa7c79d31e2ef331862c4d4b8cd25877 (diff) |
Slightly more compliant / safer NSRunLoop mode.
-rw-r--r-- | MobileCydia.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 9cc6f40..3b09f6a 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]; } |