From a449768857a976cb9ebab0694e1b4230900440a0 Mon Sep 17 00:00:00 2001 From: Sam Vermette Date: Fri, 18 Nov 2011 15:29:59 -0500 Subject: [PATCH] Bug fix: previousKeyWindow should never be self. --- SVProgressHUD/SVProgressHUD.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SVProgressHUD/SVProgressHUD.m b/SVProgressHUD/SVProgressHUD.m index d96ec13d..3477e91f 100644 --- a/SVProgressHUD/SVProgressHUD.m +++ b/SVProgressHUD/SVProgressHUD.m @@ -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; }