Skip to content

Commit 1b38783

Browse files
committed
test: fix race test due to possible panic in PositionEyes()
1 parent 18f1838 commit 1b38783

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/demoinfocs/common/player_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,8 @@ func TestPlayer_PositionEyes(t *testing.T) {
409409
}
410410

411411
func TestPlayer_PositionEyes_EntityNil(t *testing.T) {
412-
pl := new(Player)
412+
pl := &Player{}
413+
pl.demoInfoProvider = s1DemoInfoProvider
413414

414415
assert.Empty(t, pl.PositionEyes())
415416
}

0 commit comments

Comments
 (0)