Skip to content

Commit

Permalink
fix: Fix NPE in building lifecycle events
Browse files Browse the repository at this point in the history
  • Loading branch information
phinner committed Apr 29, 2024
1 parent d5f1e10 commit 88f5a3b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ internal inline fun <reified T : Building> onBuildingLifecycleEvent(

for (building in buildings) {
if (building is T) {
insert(building, event.unit.player)
insert(building, event.unit?.player)
}
}
}
Expand Down

0 comments on commit 88f5a3b

Please sign in to comment.