Fix #1776 : app crashes when you rotate the screen when uploading to OSM

This commit is contained in:
GaidamakUA 2015-12-07 11:59:43 +02:00
parent 1e8bd72692
commit 72fa967101

View file

@ -161,7 +161,7 @@ public class DashOsmEditsFragment extends DashBaseFragment
@Override @Override
public void uploadUpdated(OsmPoint point) { public void uploadUpdated(OsmPoint point) {
super.uploadUpdated(point); super.uploadUpdated(point);
if (!DashOsmEditsFragment.this.isDetached()) { if (DashOsmEditsFragment.this.isAdded()) {
onOpenDash(); onOpenDash();
} }
} }
@ -169,7 +169,7 @@ public class DashOsmEditsFragment extends DashBaseFragment
@Override @Override
public void uploadEnded(Map<OsmPoint, String> loadErrorsMap) { public void uploadEnded(Map<OsmPoint, String> loadErrorsMap) {
super.uploadEnded(loadErrorsMap); super.uploadEnded(loadErrorsMap);
if (!DashOsmEditsFragment.this.isDetached()) { if (DashOsmEditsFragment.this.isAdded()) {
onOpenDash(); onOpenDash();
} }
} }