Skip to content

Commit

Permalink
fix nullpointer
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy0000 committed Feb 3, 2023
1 parent 5a7d12e commit 11d1650
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ object ConfigSectionChecker : SectionChecker {
else -> null
} ?: return null

return SectionTransition(
from,
corrLoc,
fromSection,
corrLoc.section!!, // If inSectionTransition, must be non-null
if (to.y < from.y) TransitionKind.DESCEND else TransitionKind.ASCEND,
teleportUnnecessary = fromSection != toSection
)
return corrLoc.section?.let {
SectionTransition(
from,
corrLoc,
fromSection,
it,
if (to.y < from.y) TransitionKind.DESCEND else TransitionKind.ASCEND,
teleportUnnecessary = fromSection != toSection
)
}
}
}

0 comments on commit 11d1650

Please sign in to comment.