Skip to content

Commit

Permalink
Add handling for null pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
lealobanov committed Oct 20, 2024
1 parent b7308f1 commit 1f4ab77
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions sdk/src/main/kotlin/org/onflow/flow/sdk/models.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1520,15 +1520,17 @@ data class FlowNodeVersionInfo(
.setProtocolVersion(protocolVersion)
.setSporkRootBlockHeight(sporkRootBlockHeight)
.setNodeRootBlockHeight(nodeRootBlockHeight)
.setCompatibleRange(
.apply {
compatibleRange?.let {
NodeVersionInfoOuterClass.CompatibleRange
.newBuilder()
.setStartHeight(it.startHeight)
.setEndHeight(it.endHeight)
.build()
setCompatibleRange(
NodeVersionInfoOuterClass.CompatibleRange
.newBuilder()
.setStartHeight(it.startHeight)
.setEndHeight(it.endHeight)
.build()
)
}
)
}

override fun equals(other: Any?): Boolean {
if (this === other) return true
Expand Down

0 comments on commit 1f4ab77

Please sign in to comment.