about summary refs log tree commit diff
path: root/src/game/client/components/scoreboard.cpp
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-03-12 18:07:57 +0100
committeroy <Tom_Adams@web.de>2011-03-12 18:07:57 +0100
commitb834426548107af96c2568af22cbf8604f230965 (patch)
tree893a04ec6b37d7b1d92ee66d39707463f48e847c /src/game/client/components/scoreboard.cpp
parent7b98b3ddeddd34bf0fa0c84b13d928a9dafe140c (diff)
downloadzcatch-b834426548107af96c2568af22cbf8604f230965.tar.gz
zcatch-b834426548107af96c2568af22cbf8604f230965.zip
fixed several problems with spectator view in game and demo player. Closes #83
Diffstat (limited to 'src/game/client/components/scoreboard.cpp')
-rw-r--r--src/game/client/components/scoreboard.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/game/client/components/scoreboard.cpp b/src/game/client/components/scoreboard.cpp
index a9b249ed..0d355456 100644
--- a/src/game/client/components/scoreboard.cpp
+++ b/src/game/client/components/scoreboard.cpp
@@ -151,11 +151,14 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch
 	}
 	else
 	{
-		char aBuf[128];
-		int Score = m_pClient->m_Snap.m_pLocalInfo->m_Score;
-		str_format(aBuf, sizeof(aBuf), "%d", Score);
-		tw = TextRender()->TextWidth(0, 48, aBuf, -1);
-		TextRender()->Text(0, x+w-tw-30, y, 48, aBuf, -1);
+		if(m_pClient->m_Snap.m_pLocalInfo)
+		{
+			char aBuf[128];
+			int Score = m_pClient->m_Snap.m_pLocalInfo->m_Score;
+			str_format(aBuf, sizeof(aBuf), "%d", Score);
+			tw = TextRender()->TextWidth(0, 48, aBuf, -1);
+			TextRender()->Text(0, x+w-tw-30, y, 48, aBuf, -1);
+		}
 	}
 
 	y += 54.0f;