Browse Source

Just log an error instead of crashing when view state is messed up

master
Anthony Restaino 9 years ago
parent
commit
9b34a553ed
  1. 3
      app/src/main/java/acr/browser/lightning/view/LightningView.java

3
app/src/main/java/acr/browser/lightning/view/LightningView.java

@ -791,7 +791,8 @@ public class LightningView { @@ -791,7 +791,8 @@ public class LightningView {
// before calling destroy() so that a memory leak is not created
ViewGroup parent = (ViewGroup) mWebView.getParent();
if (parent != null) {
throw new RuntimeException("WebView was not detached from window before onDestroy");
Log.e(Constants.TAG, "WebView was not detached from window before onDestroy");
parent.removeView(mWebView);
}
mWebView.stopLoading();
mWebView.onPause();

Loading…
Cancel
Save