Skip to content

Commit e55c4ea

Browse files
authored
Merge pull request #590 from markus-wa/fix-bomb-arming
2 parents e62b9d1 + d135c88 commit e55c4ea

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/demoinfocs/datatables.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,11 @@ func (p *parser) bindBomb() {
115115
if p.isSource2() {
116116
planterHandle := bombEntity.PropertyValueMust("m_hOwnerEntity").Handle()
117117
ctlHandle := p.gameState.entities[entityIDFromHandle(planterHandle, true)].PropertyValueMust("m_hController").Handle()
118-
ctlID := p.gameState.entities[entityIDFromHandle(ctlHandle, true)].ID()
119-
planter := p.gameState.playersByEntityID[ctlID]
118+
ctl := p.gameState.entities[entityIDFromHandle(ctlHandle, true)]
119+
if ctl == nil {
120+
return
121+
}
122+
planter := p.gameState.playersByEntityID[ctl.ID()]
120123

121124
planter.IsPlanting = true
122125
p.gameState.currentPlanter = planter

0 commit comments

Comments
 (0)