Skip to content

Commit

Permalink
Fix NPE with fix for nordnet#93
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbuijs committed Jan 26, 2016
1 parent a35e9d0 commit d5ce4bf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ public void initialize(final CordovaInterface cordova, final CordovaWebView webV
@Override
public void onStart() {
super.onStart();

final EventBus eventBus = EventBus.getDefault();
if (!eventBus.isRegistered(this)) {
eventBus.register(this);
}

// ensure that www folder installed on external storage;
// if not - install it
isPluginReadyForWork = isPluginReadyForWork();
Expand All @@ -119,7 +119,7 @@ public void onStart() {
}

// reload only if we on local storage
if (!dontReloadOnStart && webView.getUrl().startsWith(LOCAL_ASSETS_FOLDER)) {
if (!dontReloadOnStart && webView.getUrl() != null && webView.getUrl().startsWith(LOCAL_ASSETS_FOLDER)) {
redirectToLocalStorageIndexPage();
}

Expand Down

0 comments on commit d5ce4bf

Please sign in to comment.