forked from github/cordova-android
Fix NPE in InAppBrowser.
When cordova.getActivity().getIntent().getExtras() == null.
This commit is contained in:
@@ -445,7 +445,7 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
|
||||
//Toggle whether this is enabled or not!
|
||||
Bundle appSettings = cordova.getActivity().getIntent().getExtras();
|
||||
boolean enableDatabase = appSettings.getBoolean("InAppBrowserStorageEnabled", true);
|
||||
boolean enableDatabase = appSettings == null ? true : appSettings.getBoolean("InAppBrowserStorageEnabled", true);
|
||||
if(enableDatabase)
|
||||
{
|
||||
String databasePath = cordova.getActivity().getApplicationContext().getDir("inAppBrowserDB", Context.MODE_PRIVATE).getPath();
|
||||
|
||||
Reference in New Issue
Block a user