diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractClientIndicator.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractClientIndicator.java index 9790c05a..c5fa6bfb 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractClientIndicator.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractClientIndicator.java @@ -36,8 +36,12 @@ public abstract class AbstractClientIndicator implements ClientIndicator { final boolean active, final boolean cachingEnabled) { - this.indicatorId = (indicatorDefinition != null) ? indicatorDefinition.id : -1; - this.examId = (indicatorDefinition != null) ? indicatorDefinition.examId : -1; + this.indicatorId = (indicatorDefinition != null && indicatorDefinition.id != null) + ? indicatorDefinition.id + : -1; + this.examId = (indicatorDefinition != null && indicatorDefinition.examId != null) + ? indicatorDefinition.examId + : -1; this.connectionId = connectionId; this.active = active; this.cachingEnabled = cachingEnabled;