diff --git a/app/src/main/java/org/eyeseetea/malariacare/layout/score/ScoreRegister.java b/app/src/main/java/org/eyeseetea/malariacare/layout/score/ScoreRegister.java index 9fcfebe21..c60144da7 100644 --- a/app/src/main/java/org/eyeseetea/malariacare/layout/score/ScoreRegister.java +++ b/app/src/main/java/org/eyeseetea/malariacare/layout/score/ScoreRegister.java @@ -78,6 +78,11 @@ public static void deleteRecord(Question question){ private static List getRecursiveScore(CompositeScore cScore, List result) { + //Protect from wrong server data + if (compositeScoreMap.get(cScore)==null) { + return Arrays.asList(new Float(0f),new Float(0f)); + } + //Sum its own records result=compositeScoreMap.get(cScore).calculateNumDenTotal(result);