diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-19 16:08:16 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-19 17:01:06 -0800 |
commit | 673a6e1ab4f3aab438db5281785b516c3c151e48 (patch) | |
tree | bf9ccf559f17311552abcbb4e75da6dc08b2774d | |
parent | 53fb38da6e19d63145dcf74badcab04cfd522d75 (diff) |
Move setToken: to main thread for Metadata_.
-rw-r--r-- | MobileCydia.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 8da8f28..cdc9a52 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]; } |