From fee50ba3b6e0b025c6f0ae4ec17be5153ca1b306 Mon Sep 17 00:00:00 2001 From: viktorljung Date: Thu, 11 Feb 2016 21:16:10 +0100 Subject: [PATCH] Crash fix --- src/Game/Systems/CapturePointHUDSystem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Game/Systems/CapturePointHUDSystem.cpp b/src/Game/Systems/CapturePointHUDSystem.cpp index 784c7e16..5369b830 100644 --- a/src/Game/Systems/CapturePointHUDSystem.cpp +++ b/src/Game/Systems/CapturePointHUDSystem.cpp @@ -17,6 +17,10 @@ void CapturePointHUDSystem::Update(double dt) auto CapturePointHUDElements = m_World->GetComponents("CapturePointHUD"); auto CapturePoints = m_World->GetComponents("CapturePoint"); + if(!CapturePointHUDElements) { + return; + } + for (auto& cCapturePointHUD : *CapturePointHUDElements) { int HUD_ID = cCapturePointHUD["CapturePointNumber"]; EntityWrapper entityHUD = EntityWrapper(m_World, cCapturePointHUD.EntityID);