Skip to content

Commit 4ba6e22

Browse files
fix #2025
1 parent b96fe38 commit 4ba6e22

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

flutter_inappwebview/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- Added `InAppWebViewController.enableSlowWholeDocumentDraw` static method
1616
- Added `CookieManager.flush` method
1717
- Updated `InAppWebViewController.takeScreenshot` implementation to support screenshot out of visible viewport when `InAppWebViewController.enableSlowWholeDocumentDraw` is called
18+
- Fixed "After dispose a InAppWebViewKeepAlive using InAppWebViewController.disposeKeepAlive. NullPointerException is thrown when main activity enter destroyed state." [#2025](https://github.com/pichillilorenzo/flutter_inappwebview/issues/2025)
1819

1920
#### macOS and iOS Platforms
2021
- Moved `WKUserContentController` initialization on `preWKWebViewConfiguration` to fix possible `undefined is not an object (evaluating 'window.webkit.messageHandlers')` javascript error

flutter_inappwebview_android/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Added `InAppWebViewController.enableSlowWholeDocumentDraw` static method
55
- Added `CookieManager.flush` method
66
- Updated `InAppWebViewController.takeScreenshot` implementation to support screenshot out of visible viewport when `InAppWebViewController.enableSlowWholeDocumentDraw` is called
7+
- Fixed "After dispose a InAppWebViewKeepAlive using InAppWebViewController.disposeKeepAlive. NullPointerException is thrown when main activity enter destroyed state." [#2025](https://github.com/pichillilorenzo/flutter_inappwebview/issues/2025)
78

89
## 1.1.3
910

flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/webview/InAppWebViewManager.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,11 @@ public void dispose() {
215215
super.dispose();
216216
Collection<FlutterWebView> flutterWebViews = keepAliveWebViews.values();
217217
for (FlutterWebView flutterWebView : flutterWebViews) {
218-
String keepAliveId = flutterWebView.keepAliveId;
219-
if (keepAliveId != null) {
220-
disposeKeepAlive(flutterWebView.keepAliveId);
218+
if (flutterWebView != null) {
219+
String keepAliveId = flutterWebView.keepAliveId;
220+
if (keepAliveId != null) {
221+
disposeKeepAlive(keepAliveId);
222+
}
221223
}
222224
}
223225
keepAliveWebViews.clear();

0 commit comments

Comments
 (0)