bug2964: Fixed exception when creating CompetitorEditDialog with a null competitor

This commit is contained in:
Tim Hessenmüller committed 2020-03-09 16:12:18 +01:00
1 parent 5017686e76
commit d2966967bb
1 file changed
+2 -1
@@ -117,7 +117,8 @@ public abstract class CompetitorEditDialog<CompetitorType extends CompetitorDTO>
this.imageUrlAndUploadComposite = new URLFieldWithFileUpload(stringMessages);
this.imageUrlAndUploadComposite.setURL(competitorToEdit.getImageURL());
this.yardstickLabel = new Label(stringMessages.yardstickNumber(yardstickScale));
this.yardstickNumber = createDoubleBox(convertYardstickTimeOnTime(competitorToEdit.getTimeOnTimeFactor(), yardstickScale), 10);
this.yardstickNumber = createDoubleBox(competitorToEdit.getTimeOnTimeFactor() == null ? null
: convertYardstickTimeOnTime(competitorToEdit.getTimeOnTimeFactor(), yardstickScale), 10);
Button yardstickScaleButton = new Button(SafeHtmlUtils.fromSafeConstant(stringMessages.changeScale()));
yardstickScaleButton.getElement().getStyle().setMarginLeft(3, Unit.PX);
yardstickScaleButton.addClickHandler(event -> {