diff --git a/core/src/com/unciv/ui/pickerscreens/PolicyPickerScreen.kt b/core/src/com/unciv/ui/pickerscreens/PolicyPickerScreen.kt index 0ef6c0cd80..aba9874961 100644 --- a/core/src/com/unciv/ui/pickerscreens/PolicyPickerScreen.kt +++ b/core/src/com/unciv/ui/pickerscreens/PolicyPickerScreen.kt @@ -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 + ) + } } }