Fixed potetial NPE rendering live races on mobile

This commit is contained in:
Benjamin Barth committed 2015-08-27 17:07:00 +02:00
1 parent fc4d26a197
commit e34e17f912
1 file changed
+5 -3
@@ -32,10 +32,12 @@ public class RegattaLiveRaces extends Composite implements RefreshableWidget<Sor
@Override
public void setData(SortedSetResult<LiveRaceDTO> data) {
setVisible(!data.isEmpty());
setVisible(data != null && !data.isEmpty());
mobileSection.clearContent();
for (LiveRaceDTO liveRace : data.getValues()) {
mobileSection.addContent(new RegattaStatusRace(liveRace));
if (data != null) {
for (LiveRaceDTO liveRace : data.getValues()) {
mobileSection.addContent(new RegattaStatusRace(liveRace));
}
}
}