Skip to content

Commit

Permalink
Merge pull request #34 from wordpress-mobile/merge/WordPress-Android/…
Browse files Browse the repository at this point in the history
…11492

WPAndroid change: Fixes NullPointerException in onDiscoverySucceeded
  • Loading branch information
anitaa1990 committed Mar 25, 2020
2 parents e80a693 + c134376 commit fd0c8c9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ void initiateDiscovery() {
@SuppressWarnings("unused")
@Subscribe(threadMode = ThreadMode.MAIN)
public void onDiscoverySucceeded(OnDiscoveryResponse event) {
if (mLoginBaseDiscoveryListener == null) {
// Ignore the event if the fragment is detached
return;
}
// hold the URL in a variable to use below otherwise it gets cleared up by endProgress
// bail if user canceled
String mRequestedSiteAddress = mLoginBaseDiscoveryListener.getRequestedSiteAddress();
Expand Down

0 comments on commit fd0c8c9

Please sign in to comment.