mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-30 09:31:25 +07:00
Fixed crash when policy prerequisite is a branch (#8273)
Co-authored-by: tunerzinc@gmail.com <vfylfhby>
This commit is contained in:
parent
38d13570a7
commit
41b5cfa9b1
@ -446,13 +446,17 @@ class PolicyPickerScreen(val worldScreen: WorldScreen, civInfo: CivilizationInfo
|
||||
continue
|
||||
|
||||
val prereqButton = policyNameToButton[prereqName]
|
||||
drawLine(group,
|
||||
// Top center
|
||||
policyButton.x+policyButton.width/2,
|
||||
policyButton.y+policyButton.height,
|
||||
// Bottom center
|
||||
prereqButton!!.x + prereqButton.width/2,
|
||||
prereqButton.y)
|
||||
if (prereqButton != null) {
|
||||
drawLine(
|
||||
group,
|
||||
// Top center
|
||||
policyButton.x + policyButton.width / 2,
|
||||
policyButton.y + policyButton.height,
|
||||
// Bottom center
|
||||
prereqButton.x + prereqButton.width / 2,
|
||||
prereqButton.y
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user