From 397998788b258ca1a9d0407d2dd1bde683b4e50a Mon Sep 17 00:00:00 2001 From: aleksandrpaskevic Date: Mon, 31 May 2021 17:18:06 +0300 Subject: [PATCH] fix bug when in String[] array come null --- .../in_app_webview/InAppWebViewChromeClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java index 224d75cd..c4afd089 100755 --- a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java +++ b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java @@ -1004,7 +1004,7 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR private Boolean arrayContainsString(String[] array, String pattern) { for (String content : array) { - if (content.contains(pattern)) { + if (content != null && content.contains(pattern)) { return true; } }