diff --git a/src/main/java/de/thm/arsnova/entities/Statistics.java b/src/main/java/de/thm/arsnova/entities/Statistics.java index cc7433320ff02108f7cb7e628d99df820ac89d82..ecb9e36a7cb368367386a7f44e91472079709ad2 100644 --- a/src/main/java/de/thm/arsnova/entities/Statistics.java +++ b/src/main/java/de/thm/arsnova/entities/Statistics.java @@ -52,7 +52,10 @@ public class Statistics { } public int getAverageAnswersPerQuestion() { - return getAnswers() / getQuestions(); + if (getQuestions() > 0) { + return getAnswers() / getQuestions(); + } + return 0; } public void setAverageAnswersPerQuestion(final int value) { // NOP