Fix possible npe

This commit is contained in:
Vitaliy 2020-05-26 12:27:27 +03:00
parent 26805c4ae8
commit 6f5a4d5bba
2 changed files with 8 additions and 4 deletions

View file

@ -554,7 +554,7 @@ public class AppInitializer implements IProgress {
customConfigs.put(fileName, builder);
} catch (XmlPullParserException | IOException e) {
Algorithms.removeAllFiles(f);
LOG.error(e);
LOG.error(e.getMessage(), e);
}
}
}

View file

@ -394,9 +394,13 @@ public class MapQuickActionLayer extends OsmandMapLayer implements QuickActionRe
contextMarker.draw(canvas);
}
if (this.nightMode != nightMode) {
this.nightMode = nightMode;
updateQuickActionButton(currentWidgetState != null && currentWidgetState);
}
this.nightMode = nightMode;
boolean widgetVisible = false;
if (currentWidgetState != null) {
widgetVisible = currentWidgetState;
}
updateQuickActionButton(widgetVisible);
}
setupQuickActionBtnVisibility();
}