From 3fb1a73c977a3163429cde749b51590186d0ed2f Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 23 Feb 2011 00:26:19 -0800 Subject: [PATCH] Slightly more compliant / safer NSRunLoop mode. --- MobileCydia.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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]; } -- 2.47.2