From 6605ea1276ecff4f44086098a21237ddd2ed2f98 Mon Sep 17 00:00:00 2001 From: michael starke Date: Sat, 5 Mar 2016 13:50:16 +0100 Subject: [PATCH] fixed #431 Crash on autotype if there are entries with invalid (or empty) urls. --- MacPass/MPDocument+Autotype.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MacPass/MPDocument+Autotype.m b/MacPass/MPDocument+Autotype.m index a5f88648..3a3ed049 100644 --- a/MacPass/MPDocument+Autotype.m +++ b/MacPass/MPDocument+Autotype.m @@ -83,7 +83,7 @@ /* test for host */ if(matchHost && !foundMatch) { NSURL *url = [NSURL URLWithString:entry.url]; - foundMatch = [windowTitle rangeOfString:url.host options:NSCaseInsensitiveSearch].length != 0; + foundMatch = url.host != nil && [windowTitle rangeOfString:url.host options:NSCaseInsensitiveSearch].length != 0; } /* test for tags */ if(matchTags && !foundMatch) {