Pebble: Webview: do not use the contextWrapper if it's null.

It should never happen but I had a crash on API 19, possibly a race condition
somewhere.
This commit is contained in:
Daniele Gobbetti
2018-06-18 20:23:23 +02:00
parent c30d0142f5
commit 45ecdaa213
@@ -190,7 +190,7 @@ public class WebViewSingleton {
webView.loadUrl("file:///android_asset/app_config/configure.html?rand=" + Math.random() * 500);
}
});
if (!internetHelperBound && !internetHelperInstalled) {
if (contextWrapper != null && !internetHelperBound && !internetHelperInstalled) {
String internetHelperPkg = "nodomain.freeyourgadget.internethelper";
String internetHelperCls = internetHelperPkg + ".MyService";
try {