Fixed dialog not being dismissed on asynctask cancel

This commit is contained in:
PaulStets 2018-05-07 10:15:38 +03:00
parent 7f496bc1d7
commit f0e21c2f20

View file

@ -300,6 +300,10 @@ public class WikivoyageWebViewClient extends WebViewClient implements RegionCall
@Override
protected void onCancelled() {
MapActivity activity = weakContext.get();
if (activity != null && !activity.isActivityDestroyed() && dialog != null) {
dialog.dismiss();
}
dialog = null;
callback = null;
}