fix app crash

This commit is contained in:
Odweta
2024-04-27 08:02:46 +02:00
parent e7f6b8eab4
commit e7077ffbf4
@@ -237,17 +237,19 @@ class Parsing {
} else {
auxSubjects.add(subjects[i])
var previous = auxSubjects[auxSubjects.size - 1].number.toInt() + 1
val next = subjects[i + 1].number.toInt()
while (previous < next) {
auxSubjects.add(
Subject.freeSubject(
previous.toString(),
subjects[i-1].end,
subjects[i+1].start
if (auxSubjects[auxSubjects.size - 1].number.toIntOrNull() != null) {
var previous = auxSubjects[auxSubjects.size - 1].number.toInt() + 1
val next = subjects[i + 1].number.toInt()
while (previous < next) {
auxSubjects.add(
Subject.freeSubject(
previous.toString(),
subjects[i-1].end,
subjects[i+1].start
)
)
)
previous += 1
previous += 1
}
}
}
}
@@ -352,4 +354,4 @@ class Parsing {
return marks
}
}
}
}