summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-02-23 00:26:19 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-02-23 00:26:19 -0800
commit3fb1a73c977a3163429cde749b51590186d0ed2f (patch)
treefad73f1545f5ff4e364bdadbc4af7fd80f74fa20 /MobileCydia.mm
parenteb403f34aa7c79d31e2ef331862c4d4b8cd25877 (diff)
Slightly more compliant / safer NSRunLoop mode.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm3
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];
}