Merge pull request #9053 from osmandapp/minor_fixes

Fix possible npe
This commit is contained in:
vshcherb 2020-05-22 15:03:54 +02:00 committed by GitHub
commit 7d072592cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View file

@ -1161,7 +1161,6 @@ public class MapMarkersHelper {
removeGroupActiveMarkers(group, true);
return;
}
for (FavouritePoint fp : favGroup.getPoints()) {
addNewMarkerIfNeeded(group, groupMarkers, new LatLon(fp.getLatitude(), fp.getLongitude()), fp.getName(), fp, null);
}

View file

@ -132,7 +132,7 @@ public class ContributionVersionActivity extends OsmandListActivity {
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(ACTIVITY_TO_INSTALL == requestCode && resultCode != RESULT_OK){
if (ACTIVITY_TO_INSTALL == requestCode && resultCode != RESULT_OK && currentInstalledDate != null) {
updateInstalledApp(false, currentInstalledDate);
}
}

View file

@ -393,9 +393,9 @@ public class MapQuickActionLayer extends OsmandMapLayer implements QuickActionRe
canvas.translate(box.getCenterPixelX() - contextMarker.getWidth() / 2, box.getCenterPixelY() - contextMarker.getHeight());
contextMarker.draw(canvas);
}
if (this.nightMode != nightMode && currentWidgetState != null) {
if (this.nightMode != nightMode) {
this.nightMode = nightMode;
updateQuickActionButton(currentWidgetState);
updateQuickActionButton(currentWidgetState != null && currentWidgetState);
}
setupQuickActionBtnVisibility();
}