]> git.saurik.com Git - cydia.git/commitdiff
Slightly more normalized if nesting on decidePolicyForNavigationAction:.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 13 Nov 2010 19:51:03 +0000 (11:51 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 15 Nov 2010 22:39:12 +0000 (14:39 -0800)
UICaboodle/BrowserView.mm

index 88dc7a4c4c92f2632c78cd465a64e0e3f9e3c02f..769aaed925aa3cf8b3f4eb3775212c35d841e9b6 100644 (file)
@@ -564,13 +564,15 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
     NSLog(@"decidePolicyForNavigationAction:%@ request:%@ frame:%@", action, request, frame);
 #endif
 
-    if (!error_ && [frame parentFrame] == nil) {
-        if (request_ != nil)
-            [request_ autorelease];
-        if (request == nil)
-            request_ = nil;
-        else
-            request_ = [request retain];
+    if ([frame parentFrame] == nil) {
+        if (!error_) {
+            if (request_ != nil)
+                [request_ autorelease];
+            if (request == nil)
+                request_ = nil;
+            else
+                request_ = [request retain];
+        }
     }
 }