Skip to content

Commit

Permalink
fix #757
Browse files Browse the repository at this point in the history
  • Loading branch information
pichillilorenzo committed Mar 26, 2021
1 parent 22ea009 commit a0e3bc2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- `getScale` WebView method is now deprecated. Use the new `getZoomScale` WebView method
- Removed `final` keyword for all `HeadlessInAppWebView` events
- Fixed wrong usage of Android WebView scale property
- Fixed "java.lang.NullPointerException: com.pichillilorenzo.flutter_inappwebview.in_app_webview.InAppWebViewRenderProcessClient$1.success(InAppWebViewRenderProcessClient.java:37)" [#757](https://github.com/pichillilorenzo/flutter_inappwebview/issues/757)

## 5.2.1+1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ public void onRenderProcessUnresponsive(@NonNull WebView view, @Nullable final W

@Override
public void success(@Nullable Object response) {
Map<String, Object> responseMap = (Map<String, Object>) response;
Integer action = (Integer) responseMap.get("action");
if (action != null && renderer != null) {
switch (action) {
case 0:
if (WebViewFeature.isFeatureSupported(WebViewFeature.WEB_VIEW_RENDERER_TERMINATE))
renderer.terminate();
break;
if (response != null) {
Map<String, Object> responseMap = (Map<String, Object>) response;
Integer action = (Integer) responseMap.get("action");
if (action != null && renderer != null) {
switch (action) {
case 0:
if (WebViewFeature.isFeatureSupported(WebViewFeature.WEB_VIEW_RENDERER_TERMINATE))
renderer.terminate();
break;
}
}
}
}
Expand All @@ -65,14 +67,16 @@ public void onRenderProcessResponsive(@NonNull WebView view, @Nullable final Web

@Override
public void success(@Nullable Object response) {
Map<String, Object> responseMap = (Map<String, Object>) response;
Integer action = (Integer) responseMap.get("action");
if (action != null && renderer != null) {
switch (action) {
case 0:
if (WebViewFeature.isFeatureSupported(WebViewFeature.WEB_VIEW_RENDERER_TERMINATE))
renderer.terminate();
break;
if (response != null) {
Map<String, Object> responseMap = (Map<String, Object>) response;
Integer action = (Integer) responseMap.get("action");
if (action != null && renderer != null) {
switch (action) {
case 0:
if (WebViewFeature.isFeatureSupported(WebViewFeature.WEB_VIEW_RENDERER_TERMINATE))
renderer.terminate();
break;
}
}
}
}
Expand Down

0 comments on commit a0e3bc2

Please sign in to comment.