Fixed crash on empty graph

This commit is contained in:
Abdelilah El Aissaoui 2022-04-07 22:57:32 +02:00
parent 7b4ab49a30
commit d055060483
2 changed files with 4 additions and 2 deletions

View file

@ -75,7 +75,7 @@ class TabState @Inject constructor(
ex.printStackTrace()
if (showError)
errorsManager.addError(newErrorNow(ex, ex.localizedMessage))
errorsManager.addError(newErrorNow(ex, ex.message.orEmpty()))
} finally {
_processing.value = false

View file

@ -351,6 +351,8 @@ class GraphCommitList : RevCommitList<GraphNode>() {
}
fun calcMaxLine() {
maxLine = this.maxOf { it.lane.position }
if(this.isNotEmpty()) {
maxLine = this.maxOf { it.lane.position }
}
}
}