Fixed crash on empty graph
This commit is contained in:
parent
7b4ab49a30
commit
d055060483
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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 }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue