Fix possible npe

This commit is contained in:
Vitaliy 2020-05-22 15:01:42 +03:00
parent 8a63a0ce53
commit 9e6826760a

View file

@ -393,7 +393,7 @@ 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) {
if (this.nightMode != nightMode && currentWidgetState != null) {
this.nightMode = nightMode;
updateQuickActionButton(currentWidgetState);
}