Check for null host in shouldInterceptRequest to prevent FCs

base64 encoded image resources were causing .getHost() to return null and then a NullPointerException when .endswith was called on line 150
This commit is contained in:
Fragger 2014-01-05 19:49:59 -08:00
parent 5d674eee40
commit bc2f005155

View File

@ -147,7 +147,7 @@ public class IITC_WebViewClient extends WebViewClient {
}
Uri uri = Uri.parse(url);
if (uri.getHost().endsWith(DOMAIN) &&
if (uri.getHost()!=null && uri.getHost().endsWith(DOMAIN) &&
("http".equals(uri.getScheme()) || "https".equals(uri.getScheme())))
return mIitc.getFileManager().getResponse(uri);