API/Librus: Fix Classrooms NPE issue

This commit is contained in:
Kuba Szczodrzyński 2019-09-19 10:09:33 +02:00
parent b7191c938f
commit d8afa47d2c

View File

@ -1600,6 +1600,10 @@ public class Librus implements EdziennikInterface {
r("finish", "Classrooms");
return;
}
if (data.get("Classrooms") == null) {
r("finish", "Classrooms");
return;
}
JsonArray jClassrooms = data.get("Classrooms").getAsJsonArray();
//d("Got Classrooms: "+jClassrooms.toString());
classrooms.clear();