From 673a6e1ab4f3aab438db5281785b516c3c151e48 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 19 Feb 2011 16:08:16 -0800 Subject: [PATCH] Move setToken: to main thread for Metadata_. --- MobileCydia.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 8da8f280..cdc9a526 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4091,7 +4091,7 @@ static NSString *Warning_; [indirect_ setButtonTitle:button withStyle:style toFunction:function]; } -- (void) setToken:(NSString *)token { +- (void) _setToken:(NSString *)token { if (Token_ != nil) [Token_ release]; Token_ = [token retain]; @@ -4100,6 +4100,10 @@ static NSString *Warning_; Changed_ = true; } +- (void) setToken:(NSString *)token { + [self performSelectorOnMainThread:@selector(_setToken:) withObject:token waitUntilDone:NO]; +} + - (void) setPopupHook:(id)function { [indirect_ setPopupHook:function]; } -- 2.45.2