[Bug #1191] avoid null pointer exception

FEA: ItEr75S04BugFixing
This commit is contained in:
Cristina Alvarino 2011-09-28 13:16:56 +02:00 committed by Manuel Rego Casasnovas
parent de9fae22f2
commit 662fd3b2d3

View file

@ -282,7 +282,12 @@ public class EffortDuration implements Comparable<EffortDuration> {
* {@link EffortDuration} and the other duration
*/
public EffortDuration plus(EffortDuration other) {
return new EffortDuration(seconds + other.seconds);
if (other != null){
return new EffortDuration(seconds + other.seconds);
}
else{
return new EffortDuration(seconds);
}
}
public boolean isZero() {