From e5ff88d3c9fd7fd21ca3729569e3bb5efe4185f8 Mon Sep 17 00:00:00 2001 From: stiffly Date: Mon, 22 Feb 2016 17:39:59 +0100 Subject: [PATCH] SoundSystem bug fix --- src/Game/Systems/SoundSystem.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Game/Systems/SoundSystem.cpp b/src/Game/Systems/SoundSystem.cpp index 7101311d..56c1f018 100644 --- a/src/Game/Systems/SoundSystem.cpp +++ b/src/Game/Systems/SoundSystem.cpp @@ -90,6 +90,9 @@ bool SoundSystem::drumTimer(double dt) bool SoundSystem::OnCaptured(const Events::Captured & e) { + if (!LocalPlayer.Valid()) { + return false; + } int homeTeam = (int)m_World->GetComponent(e.CapturePointID, "Team")["Team"]; int team = (int)m_World->GetComponent(LocalPlayer.ID, "Team")["Team"]; Events::PlaySoundOnEntity ev;