Skip to content

Commit 4c577d6

Browse files
committed
Skip updating the owner on an event with no unit
1 parent abe2b2b commit 4c577d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sc2reader/engine/plugins/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def handleUnitOwnerChangeEvent(self, event, replay):
250250
)
251251
)
252252

253-
if event.unit_upkeeper:
253+
if event.unit_upkeeper and event.unit:
254254
if event.unit.owner:
255255
event.unit.owner.units.remove(event.unit)
256256
event.unit.owner = event.unit_upkeeper

0 commit comments

Comments
 (0)