Skip to content

Commit

Permalink
Bug fix: previousKeyWindow should never be self.
Browse files Browse the repository at this point in the history
  • Loading branch information
samvermette committed Nov 18, 2011
1 parent 53ef719 commit a449768
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SVProgressHUD/SVProgressHUD.m
Expand Up @@ -276,7 +276,7 @@ - (void)showWithStatus:(NSString*)string maskType:(SVProgressHUDMaskType)hudMask

[[UIApplication sharedApplication].windows enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
UIWindow *window = (UIWindow*)obj;
if(window.windowLevel == UIWindowLevelNormal) {
if(window.windowLevel == UIWindowLevelNormal && ![[window class] isEqual:[SVProgressHUD class]]) {
self.previousKeyWindow = window;
*stop = YES;
}
Expand Down

0 comments on commit a449768

Please sign in to comment.